I have the following code in Process_Globals of Main activity.
This enables me to use a custom font throughout my project and I can simply assign typeface of labels, buttons, etc. to default_font, default_font_bold or default_font_italic by referencing their global values. Problem is when I assign the bold or italic, it is not bold or italic, just show same as a regular. Can't figure out what I need to do to get italic of the font to work.
B4X:
Dim default_font, default_font_bold, default_font_italic As Typeface
default_font=Typeface.LoadFromAssets("micross.ttf")
default_font_bold=Typeface.CreateNew(default_font,default_font.STYLE_BOLD)
default_font_italic=Typeface.CreateNew(default_font, default_font.STYLE_ITALIC)
This enables me to use a custom font throughout my project and I can simply assign typeface of labels, buttons, etc. to default_font, default_font_bold or default_font_italic by referencing their global values. Problem is when I assign the bold or italic, it is not bold or italic, just show same as a regular. Can't figure out what I need to do to get italic of the font to work.