Search code examples
androidtextviewfallbacktypeface

Android - Fallback typeface for Views


Is there a way to set a fallback typeface for views? My client is requesting a certain typeface to be used which does not support Cyrillic characters (and they want cyrillic languages..) so therefore any cyrillic characters are beautiful squares! I can't seem to find anything to set a fallback font for a textview?

In iOS theres a default fallback.. Don't let me down Android! The thought of remaking a textview and then changing every single one in my app to the new textview, to support a fallback makes my head hurt.

Thanks,


Solution

  • Currently you can't specify more than one typeface for a view's style declaration.

    I guess you'll have to be applying some damage control right now, so you may get off by specifying two styles, one that will support the client's typeface and another that will be used to render user input. You can apply one of the two to the whole application and manually set the other style to override the default typeface.