I live in Hungary, and we got some special characters like: ő, ű... etc
In my android app i made a custom TextView. This custom TextView sets a custom typeface in its constructor and it works properly, except a little bug.
The special characters like: "ő" , does not converts the new typeface, its remains the same default font.
,
(Maybe some character coding thingee or i dont know really...)
(The font i use is Helvetica Neue Light, and if i open from Windows/Fonts folder in my computer i can see the special characters, so it means this font does have the "ő" character, but some reason android cannot handle it properly.)
Please help if you can! Thanks!
E D I T:
My custom textView class:
public class FlexiTextView extends TextView {
public FlexiTextView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
initView(context);
}
public FlexiTextView(Context context) {
super(context);
initView(context);
}
public FlexiTextView(Context context, AttributeSet attrs) {
super(context, attrs);
initView(context);
}
private void initView(Context context) {
try {
Typeface typeface = Typeface.createFromAsset(context.getAssets(), "fonts/helveticaneue.ttf");
this.setTypeface(typeface);
} catch (Exception ex) {
ex.printStackTrace();
}
}
}