Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 02-09-2022, 08:13 AM   #1
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,113
Default 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
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper
Bugreports&Docs notes please do here:https://github.com/Ultraschall/ultra...-reaper/issues - Donate, if you wish

Last edited by Meo-Ada Mespotine; 02-09-2022 at 08:36 AM.
Meo-Ada Mespotine is offline   Reply With Quote
Old 02-09-2022, 08:34 AM   #2
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,113
Default

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")
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper
Bugreports&Docs notes please do here:https://github.com/Ultraschall/ultra...-reaper/issues - Donate, if you wish
Meo-Ada Mespotine is offline   Reply With Quote
Old 02-09-2022, 09:19 AM   #3
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,601
Default

Arial problem confirmed here; font sizes 19 and 21 italics are off too



Tahoma cut-offs confirmed too.
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is online now   Reply With Quote
Old 03-01-2022, 03:08 PM   #4
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,113
Default

bumpalicious
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper
Bugreports&Docs notes please do here:https://github.com/Ultraschall/ultra...-reaper/issues - Donate, if you wish
Meo-Ada Mespotine is offline   Reply With Quote
Old 03-07-2022, 06:12 PM   #5
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,213
Default

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.
Justin is offline   Reply With Quote
Old 03-08-2022, 04:45 AM   #6
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,113
Default

Hmm, so I need to manually fix it by adding an offset in these cases... :/

Is this the same case with Tahoma?
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper
Bugreports&Docs notes please do here:https://github.com/Ultraschall/ultra...-reaper/issues - Donate, if you wish
Meo-Ada Mespotine is offline   Reply With Quote
Old 03-08-2022, 04:56 AM   #7
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,601
Default

Don't use Arial
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is online now   Reply With Quote
Old 03-08-2022, 05:56 AM   #8
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,113
Default

Quote:
Originally Posted by DarkStar View Post
Don't use Arial
I need to. For UI consistency reasons.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper
Bugreports&Docs notes please do here:https://github.com/Ultraschall/ultra...-reaper/issues - Donate, if you wish
Meo-Ada Mespotine is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:44 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.