B4J Question Lao Unicode Font Display

boontong

Member
Hello I am just new in B4X, about starting with B4J, I feel I love it and will use for my further carrier development for different platform. I have problem display my language on label or text box. My country font is not listed in the property sheet, is there any way to add font (1. question). Anyway when I write on property sheet it looks ok (but not exactly the font shape), but the text on the wysiwyg designer or output screen it shows just blocks. Is there anyway to fix? Thanks.
 

boontong

Member
Thank you Erel. It works nice for label.
But how do we do for textfield (for instance) that seams do not have font member at runtime?
 
Upvote 0

boontong

Member
Thank you Klaus. I have tried to declare TextFiel as B4XView, yes now I have Font property, but with setting TextFiel.Font to my font at runtime, TextFiel still does not show character correctly. Any further solutions? My appreciation.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Thank you Klaus. I have tried to declare TextFiel as B4XView, yes now I have Font property, but with setting TextFiel.Font to my font at runtime, TextFiel still does not show character correctly. Any further solutions? My appreciation.
It is best if you upload a small project with the font file and the TextField.
 
Upvote 0

boontong

Member
I have uploaded my small project with Lao font, you can see that textfied does not show correctly, label and button are ok. Thanks.
 

Attachments

  • POS.zip
    90.4 KB · Views: 68
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I see it too and I'm not sure why it happens.

It does work with a different custom font:
B4X:
Dim fnt As B4XFont = xui.CreateFont(fx.LoadFont(File.DirAssets, "neutronium.ttf", 25), 25)
TextField1.Font = fnt

1641827941013.png


Try to look for a different Lao font file.
 
Upvote 0

boontong

Member
Erel, I have tried different Lao fonts as you advised, finally I have found one that works. Actually this one is OTF font, the remaining Lao TTF fonts do not work.
Thanks Erel and Klaus.
 
Upvote 0
Top