【iOS-Cocos2d遊戲開發之四】獨自收集Cocos2d提供的字型!共57種(有對照的字型圖)

來源:互聯網
上載者:User


 李華明Himi 原創,轉載務必在明顯處註明:

【黑米GameDev街區】 原文連結: http://www.himigame.com/iphone-cocos2d/444.html

       很多遊戲中,便於開發就會直接採用Cocos2d提供的字型庫來使用,但是因為提供的種類很多,那麼Himi利用一些時間整理了57種字型樣式,這些我想足夠你用了;

不多說下面一起來看看吧:(每張圖對應11種樣式的字型,字型的名字就是其樣式的名字)

     -----------------------------1----------------------------------

     

對應字型樣式源碼:

CCLabelTTF *myLabel = [CCLabelTTF labelWithString:@"AppleGothic" fontName:@"AppleGothic" fontSize:20];myLabel.position=ccp(70, 50);[self addChild:myLabel];CCLabelTTF *myLabel2 = [CCLabelTTF labelWithString:@"HiraKakuProN-W6" fontName:@"HiraKakuProN-W6" fontSize:20];myLabel2.position=ccp(100, 100);[self addChild:myLabel2];CCLabelTTF *myLabel3 = [CCLabelTTF labelWithString:@"HiraKakuProN-W3" fontName:@"HiraKakuProN-W3" fontSize:20];myLabel3.position=ccp(100, 150);[self addChild:myLabel3];CCLabelTTF *myLabel4 = [CCLabelTTF labelWithString:@"MarkerFelt-Thin" fontName:@"MarkerFelt-Thin" fontSize:20];myLabel4.position=ccp(100, 200);[self addChild:myLabel4];CCLabelTTF *myLabel5 = [CCLabelTTF labelWithString:@"STHeitiK-Medium" fontName:@"STHeitiK-Medium" fontSize:20];myLabel5.position=ccp(100, 250);[self addChild:myLabel5];CCLabelTTF *myLabel6 = [CCLabelTTF labelWithString:@"STHeitiK-Light" fontName:@"STHeitiK-Light" fontSize:20];myLabel6.position=ccp(100, 300);[self addChild:myLabel6];CCLabelTTF *myLabel7 = [CCLabelTTF labelWithString:@"TimesNewRomanPSMT" fontName:@"TimesNewRomanPSMT" fontSize:20];myLabel7.position=ccp(250, 50);[self addChild:myLabel7];CCLabelTTF *myLabel8 = [CCLabelTTF labelWithString:@"Helvetica-Oblique" fontName:@"Helvetica-Oblique" fontSize:20];myLabel8.position=ccp(350, 100);[self addChild:myLabel8];CCLabelTTF *myLabel9 = [CCLabelTTF labelWithString:@"Helvetica-BoldOblique" fontName:@"Helvetica-BoldOblique" fontSize:20];myLabel9.position=ccp(350, 150);[self addChild:myLabel9];CCLabelTTF *myLabel10 = [CCLabelTTF labelWithString:@"Helvetica" fontName:@"Helvetica" fontSize:20];myLabel10.position=ccp(250, 200);[self addChild:myLabel10];CCLabelTTF *myLabel11= [CCLabelTTF labelWithString:@"Helvetica-Bold" fontName:@"Helvetica-Bold" fontSize:20];myLabel11.position=ccp(300, 250);[self addChild:myLabel11];

    -----------------------------2----------------------------------

對應字型樣式源碼:

CCLabelTTF *myLabel = [CCLabelTTF labelWithString:@"TimesNewRomanPS-BoldMT" fontName:@"TimesNewRomanPS-BoldMT" fontSize:20];myLabel.position=ccp(150, 50);[self addChild:myLabel];CCLabelTTF *myLabel2 = [CCLabelTTF labelWithString:@"TimesNewRomanPS-BoldItalicMT" fontName:@"TimesNewRomanPS-BoldItalicMT" fontSize:20];myLabel2.position=ccp(150, 100);[self addChild:myLabel2];CCLabelTTF *myLabel3 = [CCLabelTTF labelWithString:@"TimesNewRomanPS-ItalicMT" fontName:@"TimesNewRomanPS-ItalicMT" fontSize:20];myLabel3.position=ccp(200, 150); [self addChild:myLabel3];CCLabelTTF *myLabel4 = [CCLabelTTF labelWithString:@"Verdana-Bold" fontName:@"Verdana-Bold" fontSize:20];myLabel4.position=ccp(100, 200);[self addChild:myLabel4];CCLabelTTF *myLabel5 = [CCLabelTTF labelWithString:@"Verdana-BoldItalic" fontName:@"Verdana-BoldItalic" fontSize:20];myLabel5.position=ccp(130, 250);[self addChild:myLabel5]; CCLabelTTF *myLabel6 = [CCLabelTTF labelWithString:@"Verdana" fontName:@"Verdana" fontSize:20];myLabel6.position=ccp(100, 300);[self addChild:myLabel6]; CCLabelTTF *myLabel7 = [CCLabelTTF labelWithString:@"Verdana-Italic" fontName:@"Verdana-Italic" fontSize:20];myLabel7.position=ccp(370, 50);[self addChild:myLabel7];  CCLabelTTF *myLabel8 = [CCLabelTTF labelWithString:@"Georgia-Bold" fontName:@"Georgia-Bold" fontSize:20];myLabel8.position=ccp(400, 100);  [self addChild:myLabel8];CCLabelTTF *myLabel9 = [CCLabelTTF labelWithString:@"Georgia" fontName:@"Georgia" fontSize:20];myLabel9.position=ccp(400, 150); [self addChild:myLabel9];CCLabelTTF *myLabel10 = [CCLabelTTF labelWithString:@"Georgia-BoldItalic" fontName:@"Georgia-BoldItalic" fontSize:20];myLabel10.position=ccp(300, 200);[self addChild:myLabel10];CCLabelTTF *myLabel11= [CCLabelTTF labelWithString:@"Georgia-Italic" fontName:@"Georgia-Italic" fontSize:20];myLabel11.position=ccp(350, 250);[self addChild:myLabel11];

    -----------------------------3----------------------------------

對應字型樣式源碼:

CCLabelTTF *myLabel = [CCLabelTTF labelWithString:@"ArialRoundedMTBold" fontName:@"ArialRoundedMTBold" fontSize:20];myLabel.position=ccp(150, 50);[self addChild:myLabel]; CCLabelTTF *myLabel2 = [CCLabelTTF labelWithString:@"TrebuchetMS-Italic" fontName:@"TrebuchetMS-Italic" fontSize:20];myLabel2.position=ccp(150, 100);[self addChild:myLabel2]; CCLabelTTF *myLabel3 = [CCLabelTTF labelWithString:@"TrebuchetMS" fontName:@"TrebuchetMS" fontSize:20];myLabel3.position=ccp(200, 150); [self addChild:myLabel3]; CCLabelTTF *myLabel4 = [CCLabelTTF labelWithString:@"Trebuchet-BoldItalic" fontName:@"Trebuchet-BoldItalic" fontSize:20];myLabel4.position=ccp(100, 200);[self addChild:myLabel4]; CCLabelTTF *myLabel5 = [CCLabelTTF labelWithString:@"TrebuchetMS-Bold" fontName:@"TrebuchetMS-Bold" fontSize:20];myLabel5.position=ccp(130, 250);[self addChild:myLabel5];  CCLabelTTF *myLabel6 = [CCLabelTTF labelWithString:@"STHeitiTC-Light" fontName:@"STHeitiTC-Light" fontSize:20];myLabel6.position=ccp(100, 300);[self addChild:myLabel6];  CCLabelTTF *myLabel7 = [CCLabelTTF labelWithString:@"STHeitiTC-Medium" fontName:@"STHeitiTC-Medium" fontSize:20];myLabel7.position=ccp(370, 50);[self addChild:myLabel7];   CCLabelTTF *myLabel8 = [CCLabelTTF labelWithString:@"GeezaPro-Bold" fontName:@"GeezaPro-Bold" fontSize:20];myLabel8.position=ccp(400, 100);  [self addChild:myLabel8]; CCLabelTTF *myLabel9 = [CCLabelTTF labelWithString:@"GeezaPro" fontName:@"GeezaPro" fontSize:20];myLabel9.position=ccp(400, 150); [self addChild:myLabel9]; CCLabelTTF *myLabel10 = [CCLabelTTF labelWithString:@"Courier" fontName:@"Courier" fontSize:20];myLabel10.position=ccp(300, 200);[self addChild:myLabel10];CCLabelTTF *myLabel11= [CCLabelTTF labelWithString:@"Courier-BoldOblique" fontName:@"Courier-BoldOblique" fontSize:20];myLabel11.position=ccp(350, 250);[self addChild:myLabel11];

    -----------------------------4----------------------------------

對應字型樣式源碼:

CCLabelTTF *myLabel = [CCLabelTTF labelWithString:@"Courier-Oblique" fontName:@"Courier-Oblique" fontSize:20];myLabel.position=ccp(150, 50);[self addChild:myLabel];  CCLabelTTF *myLabel2 = [CCLabelTTF labelWithString:@"Courier-Bold" fontName:@"Courier-Bold" fontSize:20];myLabel2.position=ccp(150, 100);[self addChild:myLabel2];  CCLabelTTF *myLabel3 = [CCLabelTTF labelWithString:@"ArialMT" fontName:@"ArialMT" fontSize:20];myLabel3.position=ccp(200, 150); [self addChild:myLabel3];  CCLabelTTF *myLabel4 = [CCLabelTTF labelWithString:@"Arial-BoldMT" fontName:@"Arial-BoldMT" fontSize:20];myLabel4.position=ccp(100, 200);[self addChild:myLabel4];  CCLabelTTF *myLabel5 = [CCLabelTTF labelWithString:@"Arial-BoldItalicMT" fontName:@"Arial-BoldItalicMT" fontSize:20];myLabel5.position=ccp(130, 250);[self addChild:myLabel5];   CCLabelTTF *myLabel6 = [CCLabelTTF labelWithString:@"Arial-ItalicMT" fontName:@"Arial-ItalicMT" fontSize:20];myLabel6.position=ccp(100, 300);[self addChild:myLabel6];   CCLabelTTF *myLabel7 = [CCLabelTTF labelWithString:@"STHeitiJ-Medium" fontName:@"STHeitiJ-Medium" fontSize:20];myLabel7.position=ccp(370, 50);[self addChild:myLabel7];    CCLabelTTF *myLabel8 = [CCLabelTTF labelWithString:@"STHeitiJ-Light" fontName:@"STHeitiJ-Light" fontSize:20];myLabel8.position=ccp(400, 100);  [self addChild:myLabel8];  CCLabelTTF *myLabel9 = [CCLabelTTF labelWithString:@"ArialHebrew" fontName:@"ArialHebrew" fontSize:20];myLabel9.position=ccp(400, 150); [self addChild:myLabel9]; CCLabelTTF *myLabel10 = [CCLabelTTF labelWithString:@"ArialHebrew-Bold" fontName:@"ArialHebrew-Bold" fontSize:20];myLabel10.position=ccp(300, 200);[self addChild:myLabel10];CCLabelTTF *myLabel11= [CCLabelTTF labelWithString:@"CourierNewPS-BoldMT" fontName:@"CourierNewPS-BoldMT" fontSize:20];myLabel11.position=ccp(350, 250);[self addChild:myLabel11];

    -----------------------------5----------------------------------

對應字型樣式源碼:

CCLabelTTF *myLabel = [CCLabelTTF labelWithString:@"CourierNewPS-ItalicMT" fontName:@"CourierNewPS-ItalicMT" fontSize:20];myLabel.position=ccp(140, 50);[self addChild:myLabel];   CCLabelTTF *myLabel2 = [CCLabelTTF labelWithString:@"CourierNewPS-BoldItalicMT" fontName:@"CourierNewPS-BoldItalicMT" fontSize:20];myLabel2.position=ccp(150, 100);[self addChild:myLabel2];  CCLabelTTF *myLabel3 = [CCLabelTTF labelWithString:@"CourierNewPSMT" fontName:@"CourierNewPSMT" fontSize:20];myLabel3.position=ccp(200, 150); [self addChild:myLabel3];   CCLabelTTF *myLabel4 = [CCLabelTTF labelWithString:@"Thonburi-Bold" fontName:@"Thonburi-Bold" fontSize:20];myLabel4.position=ccp(100, 200);[self addChild:myLabel4];   CCLabelTTF *myLabel5 = [CCLabelTTF labelWithString:@"AmericanTypewriter" fontName:@"AmericanTypewriter" fontSize:20];myLabel5.position=ccp(130, 250);[self addChild:myLabel5];  CCLabelTTF *myLabel6 = [CCLabelTTF labelWithString:@"AmericanTypewriter-Bold" fontName:@"AmericanTypewriter-Bold" fontSize:20];myLabel6.position=ccp(200, 300);[self addChild:myLabel6];  CCLabelTTF *myLabel7 = [CCLabelTTF labelWithString:@"STHeitiSC-Medium" fontName:@"STHeitiSC-Medium" fontSize:20];myLabel7.position=ccp(370, 50);[self addChild:myLabel7];     CCLabelTTF *myLabel8 = [CCLabelTTF labelWithString:@"STHeitiSC-Light" fontName:@"STHeitiSC-Light" fontSize:20];myLabel8.position=ccp(400, 100);  [self addChild:myLabel8];  CCLabelTTF *myLabel9 = [CCLabelTTF labelWithString:@"HelveticaNeue" fontName:@"HelveticaNeue" fontSize:20];myLabel9.position=ccp(400, 150); [self addChild:myLabel9]; CCLabelTTF *myLabel10 = [CCLabelTTF labelWithString:@"HelveticaNeue" fontName:@"HelveticaNeue" fontSize:20];myLabel10.position=ccp(300, 200);[self addChild:myLabel10];CCLabelTTF *myLabel11= [CCLabelTTF labelWithString:@"HelveticaNeue-Bold" fontName:@"HelveticaNeue-Bold" fontSize:20];myLabel11.position=ccp(350, 250);[self addChild:myLabel11];


    -----------------------------6----------------------------------

對應字型樣式源碼:

myLabel.position=ccp(90, 150);[self addChild:myLabel];   CCLabelTTF *myLabel2 = [CCLabelTTF labelWithString:@"Zapfino" fontName:@"Zapfino" fontSize:20];myLabel2.position=ccp(250, 150);[self addChild:myLabel2]; CCLabelTTF *myLabel3 = [CCLabelTTF labelWithString:@"~Himi整理~" fontName:@"Zapfino" fontSize:20];myLabel3.position=ccp(230, 220);[self addChild:myLabel3]; 

ok,太累了,哎~不過為了後期開發方便,所以也是值得的,分享給大家,希望大家支援下~

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.