1

Please help me this question. In my app, I used a special font to make the app more elegant. I did change the font by those of code:

public static Typeface fontsStyle;

public static void setTypeFace(TextView tv, AssetManager asm){

    if(fontsStyle == null)
        fontsStyle = Typeface.createFromAsset(asm, "fonts/VNI 08 Springtime2.ttf"); 
    tv.setTypeface(fontsStyle, Typeface.BOLD);
}

And my problem is the text broken when I display unicode character (Vietnamese).

enter image description here

I tried many fonts and it happen all times, even those of font support unicode. Any help will be appreciate. Thank you.

gZerone
  • 673
  • 12
  • 28

1 Answers1

0

The glyph (something that tell the machine how to draw a symbol) of the Unicode is not defined in the font in use.

Without the glyph, Android does not know how to render it correctly. In some Android version, you see it like square box whereas it is just a blank space in others.

System font is always safer to use in this case. To unify your app display, you can use the Roboto font designed for Android since ICS.

LightYearsBehind
  • 1,686
  • 18
  • 24