Skip to content

FTFont: Pick closest matching for Bitmap Fonts and disable hinting (Issue 3427) - #3676

Open
Ghabry wants to merge 5 commits into
EasyRPG:masterfrom
Ghabry:issue-3427
Open

FTFont: Pick closest matching for Bitmap Fonts and disable hinting (Issue 3427)#3676
Ghabry wants to merge 5 commits into
EasyRPG:masterfrom
Ghabry:issue-3427

Conversation

@Ghabry

@Ghabry Ghabry commented Aug 31, 2026

Copy link
Copy Markdown
Member

Pick closest fixes the mentioned issue.

The rest is for getting closer to GDI behaviour on Windows: Main culprit was the FT autohinter. With it disabled we are metric wise almost the same. (this doesn't affect TrueType Auto Hinting if available inside the font, which will be still used).

Though Maniacs in Wine looks completely off. Though can be likely altered in the Wine registry similar to how ClearType can be turned off.

(Before that patch WineManiac vs. EasyRPG was closer but imo the goal is to be closer metric wise to the Windows version ^^).

Test Map with fonts included:

Archiv.zip

Screenshots: The message box shows x/y/w/h per Pic. As you can see the metrics match!!!. Would never have expected that this will happen someday considering its GDI vs. FreeType but here we are. (the rendering is different in some parts but honestly both versions look awful so it doesn't matter xD)

With Blank Font.ttf by Gorurinbro. Top Left and Bottom Center are Bitmap Glyphs embedded in the Font thats why they look so good.

grafik

With Pro Font from #3427: Unscalable Font: Picks the closest matching.

grafik

Ghabry added 5 commits August 31, 2026 12:36
Harfbuzz: Call set_load_flags to synchronize the flags. Without this flag HB shapes witout considering the bitmap glyphs.
This mismatches with FreeType and results in bad rendering.

These two changes match now pretty close to Maniac Patch on Windows (and are pretty far away on Linux in Wine now)
TrueType default is "Round to Grid" which matches std::round
@Ghabry Ghabry added this to the 0.8.2 milestone Aug 31, 2026
@github-actions github-actions Bot added the Fonts label Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant