I have several fonts with different styles, say: "MyFont_default.otf", "MyFont_italic.otf", "MyFont_bold.otf"
Typically, I would set the TextView font as follows:
Typeface tf=Typeface.createFromAsset(context.getAssets(), "MyFont_italic.otf"); textView.setTypeface(tf);
And my question is: is it possible to combine all these fonts into one font, for example "MyFont", and depending on the TextView style defined in the XML layout file (italic, bold), TextView to display in the corresponding font?
source share