mirror of https://github.com/axmolengine/axmol.git
df3c449b4f
Fix up how fonts are loaded in Cocos2dx for iOS to work transparently with custom font filenames/paths such as 'MyCustomFont.ttf' or 'fonts/MyCustomFont.ttf'. Referring to fonts by these paths would be OK on Android but can't be used on iOS since fonts must be referred to by family name on iOS; we must use 'MyCustomFont' when referring to that particular font in both examples on iOS. Hence add the code to strip out the folder path and extension on iOS so that the font path 'MyCustomFont.ttf' and 'fonts/MyCustomFont.ttf' can be used transparently across all platforms. This is required especially in the case where we have custom fonts being referenced from CCB files, since CCB files store the font names with the .ttf extension included. |
||
---|---|---|
.. | ||
android | ||
blackberry | ||
ios | ||
linux | ||
mac | ||
marmalade | ||
nacl | ||
third_party | ||
win32 | ||
CCAccelerometerDelegate.h | ||
CCApplicationProtocol.h | ||
CCCommon.h | ||
CCDevice.h | ||
CCEGLViewProtocol.cpp | ||
CCEGLViewProtocol.h | ||
CCFileUtils.cpp | ||
CCFileUtils.h | ||
CCImage.h | ||
CCImageCommonWebp.cpp | ||
CCImageCommon_cpp.h | ||
CCPlatformConfig.h | ||
CCPlatformMacros.h | ||
CCSAXParser.cpp | ||
CCSAXParser.h | ||
CCThread.cpp | ||
CCThread.h | ||
platform.cpp | ||
platform.h |