Author Topic: Incorrect font height in some fonts  (Read 3189 times)

Offline Piotr Grochowski

  • Multiple posting newcomer
  • *
  • Posts: 12
Incorrect font height in some fonts
« on: April 30, 2020, 07:09:30 pm »
This is in Microsoft Windows.

[img src=https://i.imgur.com/BNdG29O.png /]

On the left is code blocks, where the font height is one pixel too much. On the right is Microsoft Notepad where the font height is handled properly.

An important thing is that it only happens with some fonts, not all fonts. This applies to both bitmap and TrueType fonts. My theory is that the incorrect font height happens when the font bottom is on the baseline (like is the case in the picture). This is not the right behavior of GDI rendering. I hate being prevented from using certain fonts as intended so please fix this issue by the next version.

Offline Piotr Grochowski

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Incorrect font height in some fonts
« Reply #1 on: April 30, 2020, 07:38:26 pm »
And yes I did update to 20.03 and it's clearly not fixed, same result!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Incorrect font height in some fonts
« Reply #2 on: April 30, 2020, 07:41:16 pm »
If you want to get help you'll need to provide more details, like:

1. Which fonts work?
2. Which doesn't?
3. What happens if you change the font size?
4. Does it work correctly in scite or codelite? Or even the stc demo in wxwidgets?
4. OS version
5. Have you tried to enable direct 2d in 20.03 ( settings -> editor -> other editor settings -> technology)?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Piotr Grochowski

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Incorrect font height in some fonts
« Reply #3 on: April 30, 2020, 07:52:48 pm »
If you want to get help you'll need to provide more details, like:

1. Which fonts work?
2. Which doesn't?
3. What happens if you change the font size?
4. Does it work correctly in scite or codelite? Or even the stc demo in wxwidgets?
4. OS version
5. Have you tried to enable direct 2d in 20.03 ( settings -> editor -> other editor settings -> technology)?

1. Ones that have space both below and above the baseline (they are internal font settings, also called WinAscent and WinDescent)
2. Ones that have the baseline at the font bottom
3. The font height gets consistently off-by-one
4. I haven't learned the entirety of the C++ language yet so I don't know about those features.
4. Windows 10 Home, 1909, 18363.778
5. There isn't a "direct 2d" option anywhere

Offline Piotr Grochowski

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Incorrect font height in some fonts
« Reply #4 on: May 26, 2020, 09:19:56 am »
Reproducible too in Windows 7 Ultimate x64 Edition.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Incorrect font height in some fonts
« Reply #5 on: May 26, 2020, 08:08:25 pm »
Have you tried the latest release? Have you tried the option from
Quote
5. Have you tried to enable direct 2d in 20.03 ( settings -> editor -> other editor settings -> technology)?

Have you tried your font in notepad++? is it the same problem?

Can you name a font? Does it happen with windows standard fonts, or do i have to download a font?

Offline Piotr Grochowski

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Incorrect font height in some fonts
« Reply #6 on: June 01, 2020, 08:27:15 am »
Have you tried the latest release? Have you tried the option from
Quote
5. Have you tried to enable direct 2d in 20.03 ( settings -> editor -> other editor settings -> technology)?

Have you tried your font in notepad++? is it the same problem?

Can you name a font? Does it happen with windows standard fonts, or do i have to download a font?

I do not have Notepad++ right now and do not intend to ever use it.

Fonts that show the Incorrect font height in some fonts glitch include: Riglos Mono (as of version 1.1, not 1.0), and TD bitmaps fonts. The way to test the fonts for font height is to use this character: █ and paste it along multiple rows.