Permalink
Browse files

Added example of custom TTF in Mac

  • Loading branch information...
ricardoquesada committed Feb 3, 2012
1 parent 577dced commit 4ee832b6871ee117b15aec7148884deb16e22bd6
Showing with 5 additions and 7 deletions.
  1. +2 −0 Resources-Mac/cocos2d_mac-Info.plist
  2. +2 −0 Resources-Mac/cocos2d_mac-no-window-Info.plist
  3. +1 −7 tests/LabelTest.m
@@ -28,5 +28,7 @@
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
+ <key>ATSApplicationFontsPath</key>
+ <string>Paint Boy.ttf</string>
</dict>
</plist>
@@ -28,5 +28,7 @@
<string>MainMenu-NoWindow</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
+ <key>ATSApplicationFontsPath</key>
+ <string>Paint Boy.ttf</string>
</dict>
</plist>
View
@@ -1268,7 +1268,6 @@ -(id) init
{
if( (self=[super init]) ) {
-#ifdef __CC_PLATFORM_IOS
CGSize s = [[CCDirector sharedDirector] winSize];
// CCLabelBMFont
@@ -1278,7 +1277,6 @@ -(id) init
center.position = ccp(s.width/2,150);
[self addChild:center];
-#endif // __CC_PLATFORM_IOS
}
return self;
@@ -1291,11 +1289,7 @@ -(NSString*) title
-(NSString *) subtitle
{
-#ifdef __CC_PLATFORM_IOS
- return @"Word wrap using CCLabelTTF";
-#elif defined(__CC_PLATFORM_MAC)
- return @"Custom TTF are not supported in Mac OS X";
-#endif
+ return @"Word wrap using CCLabelTTF and a custom TTF font";
}
@end

0 comments on commit 4ee832b

Please sign in to comment.