首页 > 其他分享 >【Cocos2d游戏开发之四】独自收集Cocos2d提供的字体!共57种(有对照的字体图)...

【Cocos2d游戏开发之四】独自收集Cocos2d提供的字体!共57种(有对照的字体图)...

时间:2023-05-16 22:32:56浏览次数:52  
标签:... fontName addChild self ccp CCLabelTTF 字体 Cocos2d position


 很多游戏中,便于开发就会直接采用Cocos2d提供的字体库来使用,但是因为提供的种类很多,那么Himi利用一些时间整理了57种字体样式,这些我想足够你用了;

不多说下面一起来看看吧:(每张图对应11种样式的字体,字体的名字就是其样式的名字)

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

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

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

 

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

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

 

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

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

 

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

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

 

【Cocos2d游戏开发之四】独自收集Cocos2d提供的字体!共57种(有对照的字体图)..._游戏


CCLabelTTF *myLabel = [CCLabelTTF labelWithString:@"CourierNewPS-ItalicMT" fontName:@"CourierNewPS-ItalicMT"
myLabel.position=ccp(140, 50);   
[self addChild:myLabel];      
CCLabelTTF *myLabel2 = [CCLabelTTF labelWithString:@"CourierNewPS-BoldItalicMT" fontName:@"CourierNewPS-BoldItalicMT"
myLabel2.position=ccp(150, 100);   
[self addChild:myLabel2];     
CCLabelTTF *myLabel3 = [CCLabelTTF labelWithString:@"CourierNewPSMT" fontName:@"CourierNewPSMT"
myLabel3.position=ccp(200, 150);    
[self addChild:myLabel3];      
CCLabelTTF *myLabel4 = [CCLabelTTF labelWithString:@"Thonburi-Bold" fontName:@"Thonburi-Bold"
myLabel4.position=ccp(100, 200);   
[self addChild:myLabel4];      
CCLabelTTF *myLabel5 = [CCLabelTTF labelWithString:@"AmericanTypewriter" fontName:@"AmericanTypewriter"
myLabel5.position=ccp(130, 250);   
[self addChild:myLabel5];     
CCLabelTTF *myLabel6 = [CCLabelTTF labelWithString:@"AmericanTypewriter-Bold" fontName:@"AmericanTypewriter-Bold"
myLabel6.position=ccp(200, 300);   
[self addChild:myLabel6];     
CCLabelTTF *myLabel7 = [CCLabelTTF labelWithString:@"STHeitiSC-Medium" fontName:@"STHeitiSC-Medium"
myLabel7.position=ccp(370, 50);   
[self addChild:myLabel7];        
CCLabelTTF *myLabel8 = [CCLabelTTF labelWithString:@"STHeitiSC-Light" fontName:@"STHeitiSC-Light"
myLabel8.position=ccp(400, 100);     
[self addChild:myLabel8];     
CCLabelTTF *myLabel9 = [CCLabelTTF labelWithString:@"HelveticaNeue" fontName:@"HelveticaNeue"
myLabel9.position=ccp(400, 150);    
[self addChild:myLabel9];    
CCLabelTTF *myLabel10 = [CCLabelTTF labelWithString:@"HelveticaNeue" fontName:@"HelveticaNeue"
myLabel10.position=ccp(300, 200);   
[self addChild:myLabel10];   
CCLabelTTF *myLabel11= [CCLabelTTF labelWithString:@"HelveticaNeue-Bold" fontName:@"HelveticaNeue-Bold"
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,太累了,哎~不过为了后期开发方便,所以也是值得的,分享给大家,希望大家支持下~

 

 

 

本文出自 “Himi” 博客,请务必保留此出处http://xiaominghimi.blog.51cto.com/2614927/628792

标签:...,fontName,addChild,self,ccp,CCLabelTTF,字体,Cocos2d,position
From: https://blog.51cto.com/u_16112859/6287652

相关文章