snowie2000 / mactype

Better font rendering for Windows.
https://mactype.net
GNU General Public License v3.0
9.86k stars 437 forks source link

Rendering issue in programs using Qt #950

Open Trildar opened 1 year ago

Trildar commented 1 year ago

Not sure if this is fixable from MacType, but there seems to be an issue with glyphs getting clipped in programs using Qt. I've observed this issue in OpenLP 3.0.2 (uses Qt5) and qBittorrent 4.5.3 (both Qt5 and Qt6 versions).

Quite likely related to #803 though the clipping looks a little different there.

MacType version: 2023.5.31 OS: Windows 10 Pro 22H2 19045.3086 MacType profile: https://pastebin.com/zYAp9m7g

Screenshots

MacType ON, ClearType OFF

OpenLP MacType ON ClearType OFF x4

MacType OFF (disabled by adding OpenLP.exe to UnloadDll), ClearType OFF

OpenLP MacType OFF ClearType OFF x4

MacType ON, ClearType ON

OpenLP MacType ON ClearType ON x4

MacType OFF (disabled by adding OpenLP.exe to UnloadDll), ClearType ON

OpenLP MacType OFF ClearType ON x4

snowie2000 commented 1 year ago

Didn't see any obvious problem. Cleartype should be ON all the time no matter you use mactype or not.

Trildar commented 1 year ago

It's better with ClearType, but I feel like there is still something subtly wrong. For example, the way some of the letters in "Commandment" in the screenshots pretty much merge with each other. Or the "re" and "ct" in the below screenshot from OBS. OBS MacType ON ClearType ON x4

snowie2000 commented 1 year ago

That is because you are using a grayscale profile for mactype, while with ClearType, you are always with subpixel rendering.

Trildar commented 1 year ago

So... you're saying that MacType should always be used with ClearType, and that grayscale settings should not be used with ClearType? Sorry if this comes off as abrasive, but why have grayscale rendering then?

snowie2000 commented 1 year ago

What I meant is that you should always leave Cleartype ON to make mactype fully functional.

I know it's kinda confusing, but the reality is that Windows changes its way of text rendering when ClearType is OFF, and that change makes mactype behave strangely.

That being said, when Mactype and cleartype both are ON, mactype takes precedence and renders your text.

but why have grayscale rendering then?

Because you used a grayscale profile. Just check your screenshot: OpenLP MacType ON ClearType ON x4

Trildar commented 1 year ago

Because you used a grayscale profile.

No, I get that. I mean you seem to imply that using one is not a good idea, but it's still provided as an option and not really recommended against anywhere either.

snowie2000 commented 1 year ago

I was not recommending something. I was just trying to explain things that seem like you already know.

If you think the letter-spacing in ClearType is better, that can be simply fixed by turning on hinting in MacType.

Trildar commented 1 year ago

I do have hinting on though. HintingMode=0 right?

Now that I check though, I think the kerning in OBS might just be wacky even without MacType.