WP8 not support FreeType font?

In file CCFreeTypeFont.cpp, you can see codes follow:

unsigned char* CCFreeTypeFont::loadSystemFont(const char *pFontName, ssize_t *size) 
{
    #if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8)
    return nullptr;
    #else
....

Is this mean FreeType font is not supported on WP8 platform?
Don’t we have any solution?

Yes, I think ttf is not supported on wp8…yet.
The solution is to create a bitmap font with Glyph Designer (or similar)

It is indeed not working in the current Cocos2d-x-versions, but someone posted a fix for it. Original post was http://www.cocos2d-x.org/forums/6/topics/37224 but due to the forum upgrade you’ll get a 404. So, I don’t know who to credit. Anyway, here is the fix…

unsigned char* CCFreeTypeFont::loadSystemFont(const char *pFontName, unsigned long *size) 
{
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
	//Froxul: Add the ability to use system fonts on WP8 and WinRT
	//http://www.cocos2d-x.org/forums/6/topics/37224
	std::string fontName(pFontName);
	if (fontName.find(".ttf") == -1) fontName += ".ttf";
	std::string fontPath = "C:\\Windows\\Fonts\\" + fontName;
	return CCFileUtils::sharedFileUtils()->getFileData(fontPath.c_str(), "rb", size);
#else

As you can see, I’ve also added WINRT-platform, since systemfonts were also not being loaded on windows 8 by the code in the #else-block. Basically the CCFreeTypeFont::loadSystemFont-function could be replaced by the above 4 lines.

Thank you @froxul. The code snap post original at Can’t create CCLabelTTF with system font!.

I added these four line code into my project, return ..getFileData really works, returned a pointer not NULL.
But any font of Arial, SimSun even Microsoft YaHei can’t be rasterized well.
Latin characters can be rendered well, but Chinese character not.

Please.

You can only use system fonts. Arial, SimSun or Microsoft YaHei are not present on Windows Phone 8. On http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202920(v=vs.105).aspx you can check which fonts are present on every WP8-device.

I use the Yu Gothic-font for Japanese translation. For Chinese you can choose between DengXian for Simplified, Microsoft Mhei for Traditional on WP8. You should use the name of the ttf-file: DengXian.ttf or MSMHei.ttf. I just checked it on my phone and Chinese text was shown correct without any invalid character “squares”.

This is works really. Awesome!
I find my bug is in CCFreeTypeFont::initWithString. cocos’s default font is Helvetica, when this kind of font load fail, Arial is loaded, not any font I set. So I need to intercept Arial before it’s loaded.
Thank you so much @froxul