CCLabel with custom TrueType font not working on Android/iOS ?

The following works on Win32, but fails on Android and iOS:

var myLabel = new CCLabel("Hello", "fonts/American Typewriter.ttf", 96, CCLabelFormat.SystemFont);

on Android/iOS this seems to fall back to the default system font.

I have included the "American Typewriter.ttf" file under Content/fonts in both Android and iOS projects, with Build Action set to "AndroidAsset" for Android and "Content" for iOS. I have set application.ContentRootDirectory to "Content" as well.

Is there anything special that needs to be done to get Android/iOS recognize custom ttf fonts that are included with the app?
It looks like the devices just do not recognize embedded ttf fonts
Using latest CocosSharp PCL 1.6.2

Thanks for any help!

Answers

  • kjpou1kjpou1 LUMember, Xamarin Team Xamurai

    Should be fixed against Forms branch and will be in our next release for 1.7.0.0 pre 2. See issue

    Thanks for letting us know.

Sign In or Register to comment.