cocos2d/x 自带字体(label)

    CCLabelTTF* label1 = CCLabelTTF::labelWithString("1掼蛋as", "AppleGothic", 15);

    label1->setPosition(ccp(50, 50));

    addChild(label1);

    CCLabelTTF* label2 = CCLabelTTF::labelWithString("2掼蛋as", "HiraKakuProN-W6", 15);

    label2->setPosition(ccp(50, 80));

    addChild(label2);

    CCLabelTTF* label3 = CCLabelTTF::labelWithString("3掼蛋as", "HiraKakuProN-W3", 15);

    label3->setPosition(ccp(50, 110));

    addChild(label3);

    CCLabelTTF* label4 = CCLabelTTF::labelWithString("4掼蛋as", "MarkerFelt-Thin", 15);

    label4->setPosition(ccp(50, 140));

    addChild(label4);

    CCLabelTTF* label5 = CCLabelTTF::labelWithString("5掼蛋as", "STHeitiK-Medium", 15);

    label5->setPosition(ccp(50, 170));

    addChild(label5);

    CCLabelTTF* label6 = CCLabelTTF::labelWithString("6掼蛋as", "STHeitiK-Light", 15);

    label6->setPosition(ccp(50, 200));

    addChild(label6);

    CCLabelTTF* label7 = CCLabelTTF::labelWithString("7掼蛋as", "TimesNewRomanPSMT", 15);

    label7->setPosition(ccp(50, 230));

    addChild(label7);

    CCLabelTTF* label8 = CCLabelTTF::labelWithString("8掼蛋as", "Helvetica-Oblique", 15);

    label8->setPosition(ccp(50, 260));

    addChild(label8);

    CCLabelTTF* label9 = CCLabelTTF::labelWithString("9掼蛋as", "Helvetica-BoldOblique", 15);

    label9->setPosition(ccp(50, 290));

    addChild(label9);

    CCLabelTTF* label10 = CCLabelTTF::labelWithString("10掼蛋as", "Helvetica", 15);

    label10->setPosition(ccp(130, 50));

    addChild(label10);

    CCLabelTTF* label11 = CCLabelTTF::labelWithString("11掼蛋as", "Helvetica-Bold", 15);

    label11->setPosition(ccp(130, 80));

    addChild(label11);

    CCLabelTTF* label12 = CCLabelTTF::labelWithString("12掼蛋as", "TimesNewRomanPS-BoldMT", 15);

    label12->setPosition(ccp(130, 110));

    addChild(label12);

    CCLabelTTF* label13 = CCLabelTTF::labelWithString("13掼蛋as", "TimesNewRomanPS-BoldItalicMT", 15);

    label13->setPosition(ccp(130, 140));

    addChild(label13);

    CCLabelTTF* label14 = CCLabelTTF::labelWithString("14掼蛋as", "TimesNewRomanPS-ItalicMT", 15);

    label14->setPosition(ccp(130, 170));

    addChild(label14);

    CCLabelTTF* label15 = CCLabelTTF::labelWithString("15掼蛋as", "Verdana-Bold", 15);

    label15->setPosition(ccp(130, 200));

    addChild(label15);

    CCLabelTTF* label16 = CCLabelTTF::labelWithString("16掼蛋as", "Verdana-BoldItalic", 15);

    label16->setPosition(ccp(130, 230));

    addChild(label16);

    CCLabelTTF* label17 = CCLabelTTF::labelWithString("17掼蛋as", "Verdana", 15);

    label17->setPosition(ccp(130, 260));

    addChild(label17);

    CCLabelTTF* label18 = CCLabelTTF::labelWithString("18掼蛋as", "Verdana-Italic", 15);

    label18->setPosition(ccp(130, 290));

    addChild(label18);

    CCLabelTTF* label19 = CCLabelTTF::labelWithString("19掼蛋as", "Georgia-Bold", 15);

    label19->setPosition(ccp(210, 50));

    addChild(label19);

    CCLabelTTF* label20 = CCLabelTTF::labelWithString("20掼蛋as", "Georgia", 15);

    label20->setPosition(ccp(210, 80));

    addChild(label20);

    CCLabelTTF* label21 = CCLabelTTF::labelWithString("掼蛋as21", "Georgia-BoldItalic", 15);

    label21->setPosition(ccp(210, 110));

    addChild(label21);

    CCLabelTTF* label22 = CCLabelTTF::labelWithString("掼蛋as22", "Georgia-Italic", 15);

    label22->setPosition(ccp(210, 140));

    addChild(label22);

    CCLabelTTF* label23 = CCLabelTTF::labelWithString("掼蛋as23", "ArialRoundedMTBold", 15);

    label23->setPosition(ccp(210, 170));

    addChild(label23);

    CCLabelTTF* label24 = CCLabelTTF::labelWithString("掼蛋as24", "TrebuchetMS-Italic", 15);

    label24->setPosition(ccp(210, 200));

    addChild(label24);

    CCLabelTTF* label25 = CCLabelTTF::labelWithString("掼蛋as25", "TrebuchetMS", 15);

    label25->setPosition(ccp(210, 230));

    addChild(label25);

    CCLabelTTF* label26 = CCLabelTTF::labelWithString("掼蛋as26", "Trebuchet-BoldItalic", 15);

    label26->setPosition(ccp(210, 260));

    addChild(label26);

    CCLabelTTF* label27 = CCLabelTTF::labelWithString("掼蛋as27", "TrebuchetMS-Bold", 15);

    label27->setPosition(ccp(210, 290));

    addChild(label27);

    CCLabelTTF* label28 = CCLabelTTF::labelWithString("掼蛋as28", "STHeitiTC-Light", 15);

    label28->setPosition(ccp(290, 50));

    addChild(label28);

    CCLabelTTF* label29 = CCLabelTTF::labelWithString("掼蛋as29", "STHeitiTC-Medium", 15);

    label29->setPosition(ccp(290, 80));

    addChild(label29);

    CCLabelTTF* label30 = CCLabelTTF::labelWithString("掼蛋as30", "GeezaPro-Bold", 15);

    label30->setPosition(ccp(290, 110));

    addChild(label30);

    CCLabelTTF* label31 = CCLabelTTF::labelWithString("掼蛋as31", "GeezaPro", 15);

    label31->setPosition(ccp(290, 140));

    addChild(label31);

    CCLabelTTF* label32 = CCLabelTTF::labelWithString("掼蛋as32", "Courier", 15);

    label32->setPosition(ccp(290, 170));

    addChild(label32);

    CCLabelTTF* label33 = CCLabelTTF::labelWithString("掼蛋as33", "Courier-BoldOblique", 15);

    label33->setPosition(ccp(290, 200));

    addChild(label33);

    CCLabelTTF* label34 = CCLabelTTF::labelWithString("掼蛋as34", "Courier-Oblique", 15);

    label34->setPosition(ccp(290, 230));

    addChild(label34);

    CCLabelTTF* label35 = CCLabelTTF::labelWithString("掼蛋as35", "Courier-Bold", 15);

    label35->setPosition(ccp(290, 260));

    addChild(label35);

    CCLabelTTF* label36 = CCLabelTTF::labelWithString("掼蛋as36", "ArialMT", 15);

    label36->setPosition(ccp(290, 290));

    addChild(label36);

    CCLabelTTF* label37 = CCLabelTTF::labelWithString("掼蛋as37", "Arial-BoldMT", 15);

    label37->setPosition(ccp(370, 50));

    addChild(label37);

    CCLabelTTF* label38 = CCLabelTTF::labelWithString("掼蛋as38", "Arial-BoldItalicMT", 15);

    label38->setPosition(ccp(370, 80));

    addChild(label38);

    CCLabelTTF* label39 = CCLabelTTF::labelWithString("掼蛋as39", "Arial-ItalicMT", 15);

    label39->setPosition(ccp(370, 110));

    addChild(label39);

    CCLabelTTF* label40 = CCLabelTTF::labelWithString("掼蛋as40", "STHeitiJ-Medium", 15);

    label40->setPosition(ccp(370, 140));

    addChild(label40);

    CCLabelTTF* label41 = CCLabelTTF::labelWithString("掼蛋as41", "STHeitiJ-Light", 15);

    label41->setPosition(ccp(370, 170));

    addChild(label41);

    CCLabelTTF* label42 = CCLabelTTF::labelWithString("掼蛋as42", "ArialHebrew", 15);

    label42->setPosition(ccp(370, 200));

    addChild(label42);

    CCLabelTTF* label43 = CCLabelTTF::labelWithString("掼蛋as43", "ArialHebrew-Bold", 15);

    label43->setPosition(ccp(370, 230));

    addChild(label43);

    CCLabelTTF* label44 = CCLabelTTF::labelWithString("掼蛋as44", "CourierNewPS-BoldMT", 15);

    label44->setPosition(ccp(370, 260));

    addChild(label44);

    CCLabelTTF* label45 = CCLabelTTF::labelWithString("掼蛋as45", "CourierNewPS-ItalicMT", 15);

    label45->setPosition(ccp(370, 290));

    addChild(label45);

    CCLabelTTF* label46 = CCLabelTTF::labelWithString("掼蛋as46", "CourierNewPS-BoldItalicMT", 15);

    label46->setPosition(ccp(450, 50));

    addChild(label46);

    CCLabelTTF* label47 = CCLabelTTF::labelWithString("掼蛋as47", "CourierNewPSMT", 15);

    label47->setPosition(ccp(450, 80));

    addChild(label47);

    CCLabelTTF* label48 = CCLabelTTF::labelWithString("掼蛋as48", "Thonburi-Bold", 15);

    label48->setPosition(ccp(450, 110));

    addChild(label48);

    CCLabelTTF* label49 = CCLabelTTF::labelWithString("掼蛋as49", "AmericanTypewriter", 15);

    label49->setPosition(ccp(450, 140));

    addChild(label49);

    CCLabelTTF* label50 = CCLabelTTF::labelWithString("掼蛋as50", "AmericanTypewriter-Bold", 15);

    label50->setPosition(ccp(450, 170));

    addChild(label50);

    CCLabelTTF* label51 = CCLabelTTF::labelWithString("掼蛋as51", "STHeitiSC-Medium", 15);

    label51->setPosition(ccp(450, 200));

    addChild(label51);

    CCLabelTTF* label52 = CCLabelTTF::labelWithString("掼蛋as52", "STHeitiSC-Light", 15);

    label52->setPosition(ccp(450, 230));

    addChild(label52);

    CCLabelTTF* label53 = CCLabelTTF::labelWithString("掼蛋as53", "HelveticaNeue", 15);

    label53->setPosition(ccp(450, 260));

    addChild(label53);

    CCLabelTTF* label54 = CCLabelTTF::labelWithString("掼蛋as54", "HelveticaNeue", 15);

    label54->setPosition(ccp(450, 290));

    addChild(label54);

    CCLabelTTF* label55 = CCLabelTTF::labelWithString("掼蛋as55", "HelveticaNeue-Bold", 15);

    label55->setPosition(ccp(50, 20));

    addChild(label55);

    CCLabelTTF* label56 = CCLabelTTF::labelWithString("掼蛋as56", "Zapfino", 15);

    label56->setPosition(ccp(130, 20));

    addChild(label56);

    CCLabelTTF* label57 = CCLabelTTF::labelWithString("掼蛋as57", "Thonburi", 15);

    label57->setPosition(ccp(210, 20));

    addChild(label57);

    CCLabelTTF* label58 = CCLabelTTF::labelWithString("掼蛋as58", "Marker Felt", 15);

    label58->setPosition(ccp(290, 20));

    addChild(label58);

原文地址:https://www.cnblogs.com/lh92lxm/p/3552915.html