 |
|
|
02-09-2022, 08:13 AM
|
#1
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,113
|
GFX-windows: issues with italic text with Arial and Tahoma
When I run the following code, it displays ABCDEF in various styles.
And when the text is displayed in italics, it has a significant offset and shows up lower than the rest.
This looks wrong somehow...
Code:
gfx.init("name")
gfx.setfont(1, "Arial", 20, 0)
gfx.drawstr("ABCDEF")
gfx.setfont(1, "Arial", 20, 16896)
gfx.drawstr("ABCDEF")
gfx.setfont(1, "Arial", 20, 0)
gfx.drawstr("ABCDEF")
gfx.setfont(1, "Arial", 20, 18688)
gfx.drawstr("ABCDEF")
gfx.setfont(1, "Arial", 20, 0)
gfx.drawstr("ABCDEF")
It seems to be only with Arial and only with italic, from what I see.
Tested on Windows 7, Reaper 6.44x64
Last edited by Meo-Ada Mespotine; 02-09-2022 at 08:36 AM.
|
|
|
02-09-2022, 08:34 AM
|
#2
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,113
|
And another issue I found, this time with italic in Tahoma:
Some letters are "cut off", as if they are outside of a boundary box, as the letters "edler" in this example:
Code:
gfx.init("name", 1800, 200)
gfx.setfont(1, "Tahoma", 40, 0)
gfx.drawstr("Original Text")
gfx.setfont(1, "Tahoma", 40, 16896)
gfx.drawstr("Fat Text")
gfx.setfont(1, "Tahoma", 40, 0)
gfx.drawstr("wi")
gfx.setfont(1, "Tahoma", 40, 18688)
gfx.drawstr("edler")
gfx.setfont(1, "Tahoma", 40, 0)
gfx.drawstr("weniger")
|
|
|
02-09-2022, 09:19 AM
|
#3
|
Human being with feelings
Join Date: May 2006
Location: Surrey, UK
Posts: 19,601
|
Arial problem confirmed here; font sizes 19 and 21 italics are off too
Tahoma cut-offs confirmed too.
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
|
|
|
03-01-2022, 03:08 PM
|
#4
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,113
|
bumpalicious
|
|
|
03-07-2022, 06:12 PM
|
#5
|
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 15,213
|
The right edges of italics getting cut a bit we can fix. The Y offset on Arial seems to be specific to Arial... Maybe it has a different ascender metric. Hard to correct that without potentially breaking a lot.
|
|
|
03-08-2022, 04:45 AM
|
#6
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,113
|
Hmm, so I need to manually fix it by adding an offset in these cases... :/
Is this the same case with Tahoma?
|
|
|
03-08-2022, 04:56 AM
|
#7
|
Human being with feelings
Join Date: May 2006
Location: Surrey, UK
Posts: 19,601
|
Don't use Arial
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
|
|
|
03-08-2022, 05:56 AM
|
#8
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,113
|
Quote:
Originally Posted by DarkStar
Don't use Arial 
|
I need to. For UI consistency reasons.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 05:44 AM.
|