FTFont: Pick closest matching for Bitmap Fonts and disable hinting (Issue 3427) - #3676
Open
Ghabry wants to merge 5 commits into
Open
FTFont: Pick closest matching for Bitmap Fonts and disable hinting (Issue 3427)#3676Ghabry wants to merge 5 commits into
Ghabry wants to merge 5 commits into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.ttfby Gorurinbro. Top Left and Bottom Center are Bitmap Glyphs embedded in the Font thats why they look so good.With Pro Font from #3427: Unscalable Font: Picks the closest matching.