Linked Questions

Popular Questions

Custom Font not working on Android

Asked by At

I am doing the below. All I get is the basic font, not my custom symbol font.

Any ideas?

     Paint pnt = new Paint();
    // SymbolNo is 38. Returns string "&" which is correct in normal font.
    String symbolText = Character.toString((char)SymbolNo); 

    // Should adopt a symbol font and draw symbol to screen instead. But I just see "&"
    Typeface tf = Typeface.createFromAsset(m_context.getAssets(), "fonts/myFont.TTF" ); 

    m_canvas.drawText(symbolText,x, y, pnt);

my font is in assets/fonts/myFont.TTF

Related Questions