S shashkiranr Active Member Licensed User Longtime User Jun 17, 2015 #1 Hi All, The awesome rich string lib allow to style a string only with basic fonts and not custom fonts. I came across a blog which used the below code to style a string using custom font. Is there any way it can be achieved in B4A ? Code: Copy SpannableString s = new SpannableString("My Title"); s.setSpan(new TypefaceSpan(this, "MyTypeface.otf"), 0, s.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); Regards, SK
Hi All, The awesome rich string lib allow to style a string only with basic fonts and not custom fonts. I came across a blog which used the below code to style a string using custom font. Is there any way it can be achieved in B4A ? Code: Copy SpannableString s = new SpannableString("My Title"); s.setSpan(new TypefaceSpan(this, "MyTypeface.otf"), 0, s.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); Regards, SK
Erel B4X founder Staff member Licensed User Longtime User Jun 17, 2015 #2 Do you want to use several different fonts in the same label? This is not possible with the RichString library. Upvote 0
Do you want to use several different fonts in the same label? This is not possible with the RichString library.
S shashkiranr Active Member Licensed User Longtime User Jun 17, 2015 #3 No Erel. Just one but its not a font its in the action bar title. hence i need the SpannableString. Is there a way to achieve the above posted code in b4a ? Upvote 0
No Erel. Just one but its not a font its in the action bar title. hence i need the SpannableString. Is there a way to achieve the above posted code in b4a ?
Erel B4X founder Staff member Licensed User Longtime User Jun 20, 2015 #4 Not without using inline java. Upvote 0