Page 1 of 1

Very small font and corrupted characters

Posted: Thu Jun 13, 2019 5:41 am
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!

Re: Very small font and corrupted characters

Posted: Thu Jun 13, 2019 8:10 am
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.

Re: Very small font and corrupted characters

Posted: Thu Jun 13, 2019 4:33 pm
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?

Re: Very small font and corrupted characters

Posted: Wed Sep 25, 2019 5:33 am
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.

Re: Very small font and corrupted characters

Posted: Wed Sep 25, 2019 6:46 am
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

Re: Very small font and corrupted characters

Posted: Wed Sep 25, 2019 4:35 pm
by marcoagpinto
@#NULL

Well, on Windows 10 1903 it gets corrupted results:
Image

Re: Very small font and corrupted characters

Posted: Wed Sep 25, 2019 4:59 pm
by wilbert
On Windows you can use the "Arial Unicode MS" font instead of Arial.

Re: Very small font and corrupted characters

Posted: Wed Sep 25, 2019 5:06 pm
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!

Re: Very small font and corrupted characters

Posted: Thu Sep 26, 2019 4:30 am
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! :)

Re: Very small font and corrupted characters

Posted: Fri May 08, 2020 9:50 am
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!

Re: Very small font and corrupted characters

Posted: Fri May 08, 2020 4:13 pm
by RASHAD
Try to use any OTF font