I IamBot Member Licensed User Longtime User Oct 6, 2012 #1 Hi, How do I use external typefaces for RichStrings? Below code did not seem to work. Code: Dim myfont As Typeface Dim cdTitle As RichString myfont = Typeface.LoadFromAssets("font2.ttf") cdTitle.Initialize(Stage & " - Stage Info") cdTitle.Typeface(myfont, 0, 9) ret = cd.Show(cdTitle,"","Back","",Null) This gives the CustomDialog3 title default typface.
Hi, How do I use external typefaces for RichStrings? Below code did not seem to work. Code: Dim myfont As Typeface Dim cdTitle As RichString myfont = Typeface.LoadFromAssets("font2.ttf") cdTitle.Initialize(Stage & " - Stage Info") cdTitle.Typeface(myfont, 0, 9) ret = cd.Show(cdTitle,"","Back","",Null) This gives the CustomDialog3 title default typface.
Erel B4X founder Staff member Licensed User Longtime User Oct 7, 2012 #2 Try to show the text in a Label. Does it show the custom font? Upvote 0
I IamBot Member Licensed User Longtime User Oct 7, 2012 #3 Nope, it did not seem to work either. If I just use "serif" for example instead of myfont, then both works. Any other suggestion? Upvote 0
Nope, it did not seem to work either. If I just use "serif" for example instead of myfont, then both works. Any other suggestion?
Erel B4X founder Staff member Licensed User Longtime User Oct 7, 2012 #4 Can you upload this font file? Upvote 0
I IamBot Member Licensed User Longtime User Oct 7, 2012 #5 Erel said: Can you upload this font file? Click to expand... Please find the file attached. Note that I'm using this font for all the other labels etc. in my program and it works fine. The problem occurs when I started to use RichString. Upvote 0
Erel said: Can you upload this font file? Click to expand... Please find the file attached. Note that I'm using this font for all the other labels etc. in my program and it works fine. The problem occurs when I started to use RichString.
Erel B4X founder Staff member Licensed User Longtime User Oct 7, 2012 #6 RichString Typeface method doesn't support external typefaces. You will need to set the typeface of the target. Upvote 0
RichString Typeface method doesn't support external typefaces. You will need to set the typeface of the target.
I IamBot Member Licensed User Longtime User Oct 7, 2012 #7 Erel said: RichString Typeface method doesn't support external typefaces. You will need to set the typeface of the target. Click to expand... Not sure what that means entirely, I can only use the standard "MONOSPACE", "SERIF" and "SANS-SERIF" for RichStrings? Thanks for your time. Upvote 0
Erel said: RichString Typeface method doesn't support external typefaces. You will need to set the typeface of the target. Click to expand... Not sure what that means entirely, I can only use the standard "MONOSPACE", "SERIF" and "SANS-SERIF" for RichStrings? Thanks for your time.
Erel B4X founder Staff member Licensed User Longtime User Oct 7, 2012 #8 You should set the Typeface property of the target view: Code: Label1.Typeface = Typeface.LoadFromAssets(...) Upvote 0
You should set the Typeface property of the target view: Code: Label1.Typeface = Typeface.LoadFromAssets(...)