Very small font and corrupted characters

Just starting out? Need help? Post your questions and find answers here.
User avatar
marcoagpinto
Addict
Addict
Posts: 939
Joined: Sun Mar 10, 2013 3:01 pm
Location: Portugal
Contact:

Very small font and corrupted characters

Post by marcoagpinto »

Hello!

My Proofing Tool GUI software is being used by a user to develop the Marathi spell checker.

However:
Image

I am using the Arial font.

Notice how the font becomes petite in the "Rules" column and also in the first column. All other columns show normal size.

Also, at the bottom, the EditorGadget shows corrupt characters... how can this be if in the ListIconGadget and StringGadget they appear well?

I am using PureBasic 5.70 LTS, can this be a PB bug?

Thanks!
User avatar
Bisonte
Addict
Addict
Posts: 1226
Joined: Tue Oct 09, 2007 2:15 am

Re: Very small font and corrupted characters

Post by Bisonte »

If I see the letters in the StringGadget "Word:" ... it looks like Marathi.
So I think he is using a font for this. You use arial, so some of the letters cannot shown.
PureBasic 6.04 LTS (Windows x86/x64) | Windows10 Pro x64 | Asus TUF X570 Gaming Plus | R9 5900X | 64GB RAM | GeForce RTX 3080 TI iChill X4 | HAF XF Evo | build by vannicom​​
English is not my native language... (I often use DeepL to translate my texts.)
User avatar
marcoagpinto
Addict
Addict
Posts: 939
Joined: Sun Mar 10, 2013 3:01 pm
Location: Portugal
Contact:

Re: Very small font and corrupted characters

Post by marcoagpinto »

Bisonte wrote:If I see the letters in the StringGadget "Word:" ... it looks like Marathi.
So I think he is using a font for this. You use arial, so some of the letters cannot shown.
But I set "Arial" to all gadgets... how can the gadgets use two fonts and the EditorGadget doesn't show the Marathi?
shantanuo
New User
New User
Posts: 2
Joined: Wed Sep 25, 2019 5:20 am

Re: Very small font and corrupted characters

Post by shantanuo »

I guess it works only with "display" dialog boxes, but does not render unicode characters correctly in "Edit" dialog boxes.
For e.g. all the words on Thesaurus tab shows correctly as shown below. But if I try to edit a word, the "Meanings" section shows only boxes while "Synonym" shows correctly.
I am not sure if this should be reported to PureBasic or the Programmer though :)

Correct:
Image

Incorrect rendering:
Image

The same incorrect rendering while trying to bulk import:
Image

If anyone wants to see this in action, feel free to download the .oxt file from...

https://extensions.libreoffice.org/exte ... ellchecker

Unzip and open th_mr_IN_v2.dat file from thesaurus tab.
#NULL
Addict
Addict
Posts: 1440
Joined: Thu Aug 30, 2007 11:54 pm
Location: right here

Re: Very small font and corrupted characters

Post by #NULL »

Can you try with this code? (Works here, Linux)

Code: Select all

win = OpenWindow(#PB_Any, 50, 100, 800, 600, "..")
AddKeyboardShortcut(win, #PB_Shortcut_Escape, 10)
tx = TextGadget(#PB_Any, 10, 10, 300, 20, "")
ed = EditorGadget(#PB_Any, 10, 30, 300, 100)
tx2 = TextGadget(#PB_Any, 10, 160, 300, 20, "")
ed2 = EditorGadget(#PB_Any, 10, 190, 300, 100)

f = LoadFont(#PB_Any, "arial", 12)
Debug f
SetGadgetFont(tx2, FontID(f))
SetGadgetFont(ed2, FontID(f))

s.s = "Marathi (मराठी marāṭhī [mə'ɾa:ʈʰi:])"
SetGadgetText(tx, s)
SetGadgetText(ed, s)
SetGadgetText(tx2, s)
SetGadgetText(ed2, s)

Repeat
  WaitWindowEvent()
Until Event() = #PB_Event_CloseWindow Or Event() = #PB_Event_Menu
User avatar
marcoagpinto
Addict
Addict
Posts: 939
Joined: Sun Mar 10, 2013 3:01 pm
Location: Portugal
Contact:

Re: Very small font and corrupted characters

Post by marcoagpinto »

@#NULL

Well, on Windows 10 1903 it gets corrupted results:
Image
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3870
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: Very small font and corrupted characters

Post by wilbert »

On Windows you can use the "Arial Unicode MS" font instead of Arial.
Windows (x64)
Raspberry Pi OS (Arm64)
User avatar
marcoagpinto
Addict
Addict
Posts: 939
Joined: Sun Mar 10, 2013 3:01 pm
Location: Portugal
Contact:

Re: Very small font and corrupted characters

Post by marcoagpinto »

@Shantanu!!!!

Please try the font:
"Arial Unicode MS"

Like mentioned by the person in the previous post.

Tell me if it works.

Thanks!
shantanuo
New User
New User
Posts: 2
Joined: Wed Sep 25, 2019 5:20 am

Re: Very small font and corrupted characters

Post by shantanuo »

wilbert wrote:On Windows you can use the "Arial Unicode MS" font instead of Arial.
Thank you for that hint. In fact any unicode Marathi font will solve this problem! :)
User avatar
marcoagpinto
Addict
Addict
Posts: 939
Joined: Sun Mar 10, 2013 3:01 pm
Location: Portugal
Contact:

Re: Very small font and corrupted characters

Post by marcoagpinto »

Hello!

"Arial Unicode MS" no longer comes with Microsoft Office and I have a new computer since January (and it is no longer there).

Is there any replacement for it for the Marathi language?

Thanks!
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4636
Joined: Sun Apr 12, 2009 6:27 am

Re: Very small font and corrupted characters

Post by RASHAD »

Try to use any OTF font
Egypt my love
Post Reply