diff --git a/cocos2dx/platform/ios/CCImage_ios.mm b/cocos2dx/platform/ios/CCImage_ios.mm index cfb9258f7e..25885dd5b5 100644 --- a/cocos2dx/platform/ios/CCImage_ios.mm +++ b/cocos2dx/platform/ios/CCImage_ios.mm @@ -338,7 +338,7 @@ static CGSize _caculateStringSizeWithFontOrZFont(NSString *str, id font, CGSize CGSize tmp; if (isZfont) { - [FontLabelStringDrawingHelper sizeWithZFont:str zfont:font]; + tmp = [FontLabelStringDrawingHelper sizeWithZFont:str zfont:font]; } else { diff --git a/tests/tests/FontTest/FontTest.cpp b/tests/tests/FontTest/FontTest.cpp index 593ded6111..76ffe55262 100644 --- a/tests/tests/FontTest/FontTest.cpp +++ b/tests/tests/FontTest/FontTest.cpp @@ -9,21 +9,13 @@ enum { }; static int fontIdx = 0; + +static std::string fontList[] = +{ #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) -static std::string fontList[] = -{ - "American Typewriter", + "American Typewriter", "Marker Felt", - "A Damn Mess", - "Abberancy", - "Abduction", - "Paint Boy", - "Schwarzwald Regular", - "Scissor Cuts", -}; -#else -static std::string fontList[] = -{ +#endif "fonts/A Damn Mess.ttf", "fonts/Abberancy.ttf", "fonts/Abduction.ttf", @@ -31,7 +23,6 @@ static std::string fontList[] = "fonts/Schwarzwald Regular.ttf", "fonts/Scissor Cuts.ttf", }; -#endif static const char* nextAction(void) {