It is currently Mon Oct 14, 2019 4:35 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Very small font and corrupted characters
PostPosted: Thu Jun 13, 2019 5:41 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Mar 10, 2013 3:01 pm
Posts: 650
Location: Portugal
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!


Top
 Profile  
Reply with quote  
 Post subject: Re: Very small font and corrupted characters
PostPosted: Thu Jun 13, 2019 8:10 am 
Offline
Addict
Addict
User avatar

Joined: Tue Oct 09, 2007 2:15 am
Posts: 1084
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 5.71 LTS (Windows x86/x64) | Windows10 Pro x64 | Z370 Extreme4 | i7 8770k | 32GB RAM | iChill GeForce GTX 980 X4 Ultra | HAF XF Evo​​
English is not my native language... (I often use DeepL to translate my texts.)


Top
 Profile  
Reply with quote  
 Post subject: Re: Very small font and corrupted characters
PostPosted: Thu Jun 13, 2019 4:33 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Mar 10, 2013 3:01 pm
Posts: 650
Location: Portugal
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: Very small font and corrupted characters
PostPosted: Wed Sep 25, 2019 5:33 am 
Offline
New User
New User

Joined: Wed Sep 25, 2019 5:20 am
Posts: 2
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Very small font and corrupted characters
PostPosted: Wed Sep 25, 2019 6:46 am 
Offline
Addict
Addict

Joined: Thu Aug 30, 2007 11:54 pm
Posts: 1096
Location: right here
Can you try with this code? (Works here, Linux)
Code:
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


Top
 Profile  
Reply with quote  
 Post subject: Re: Very small font and corrupted characters
PostPosted: Wed Sep 25, 2019 4:35 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Mar 10, 2013 3:01 pm
Posts: 650
Location: Portugal
@#NULL

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


Top
 Profile  
Reply with quote  
 Post subject: Re: Very small font and corrupted characters
PostPosted: Wed Sep 25, 2019 4:59 pm 
Offline
PureBasic Expert
PureBasic Expert

Joined: Sun Aug 08, 2004 5:21 am
Posts: 3471
Location: Netherlands
On Windows you can use the "Arial Unicode MS" font instead of Arial.

_________________
macOS 10.15 Catalina, PB 5.71 x64


Top
 Profile  
Reply with quote  
 Post subject: Re: Very small font and corrupted characters
PostPosted: Wed Sep 25, 2019 5:06 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Mar 10, 2013 3:01 pm
Posts: 650
Location: Portugal
@Shantanu!!!!

Please try the font:
"Arial Unicode MS"

Like mentioned by the person in the previous post.

Tell me if it works.

Thanks!


Top
 Profile  
Reply with quote  
 Post subject: Re: Very small font and corrupted characters
PostPosted: Thu Sep 26, 2019 4:30 am 
Offline
New User
New User

Joined: Wed Sep 25, 2019 5:20 am
Posts: 2
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! :)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye