mqasim23 / jswc-web

Other
0 stars 1 forks source link

Something Wrong with Font Sizes #227

Open mkromberg opened 1 week ago

mkromberg commented 1 week ago

If I create a Win32 Form as follows:

'#.F1' ⎕WC 'Form' 'Hello' (10 10)(300 400)('Coord' 'Pixel')
'#.F1.FNT' ⎕WC'Font'('PName' 'Segoe UI')('Size' 30)
'#.F1.TXT' ⎕WC 'Text' 'Hello' (10 10)
'#.F1.TXT2' ⎕WC 'Text' 'Hello' (40 10)('FontObj' 'F1.FNT')

The top left of the form looks like this:

image

However, if I do the same with EWC, the default font is smaller, and the one with a specific size is larger:

image

     'F1' eWC 'Form' 'Hello' (10 10)(300 400)('Coord' 'Pixel')
{"WC":{"ID":"F1","Properties":{"Caption":"Hello","Coord":"Pixel","Posn":[0,0],"Size":[300,400],"Type":"Form"}}} 
      'F1.FNT' eWC'Font'('PName' 'Segoe UI')('Size' 30)
{"WC":{"ID":"F1.FNT","Properties":{"PName":"Noto Sans","Size":30,"Type":"Font"}}} 
      'F1.TXT' eWC 'Text' 'Hello' (10 10)
{"WC":{"ID":"F1.TXT","Properties":{"Points":[[10],[10]],"Text":["Hello"],"Type":"Text"}}} 
      'F1.TXT2' eWC 'Text' 'Hello' (40 10)('FontObj' 'F1.FNT')
{"WC":{"ID":"F1.TXT2","Properties":{"FontObj":"F1.FNT","Points":[[40],[10]],"Text":["Hello"],"Type":"Text"}}} 
mkromberg commented 1 week ago

If we create the same form as DemoButtons in Win32, we can see that the Win32 font sizes are the same for the Group Box text, the buttons, and the label, whereas EWC is using different font sizes. The size of the group box caption and the label texts should be the same as the check box legends. EWC on the left, Win32 on the right:

image

Note that no font sizes are set in this demo, everything should have the default font size.