Skip to content

Conversation

@aaronbell
Copy link
Collaborator

@aaronbell aaronbell commented Aug 28, 2020

Summary of the Pull Request

This PR modifies the build script to add "OVERLAP_SIMPLE" to normal glyphs and "OVERLAP_COMPOUND" to component glyphs.

PR Checklist

Detailed Description of the Pull Request / Additional comments

Under FreeType, "overlapping contours can produce pixels with inflated coverage because FreeType normally integrates the coverage. To mitigate the artefacts, oversampling is necessary (increase resolution 4x4 and average the results)"
(quote from here). FreeType relies on the "OVERLAP_SIMPLE" and "OVERLAP_COMPOUND" flags to be set to know when this oversampling should take place.

At current, Cascadia does not contain either of these two flags. This fix will add one or the other to every glyph in Cascadia (depending on type of glyph), thus resolving the issue. Once the ufo2ft library adds functionality to address this issue, the build script modification can be removed.

The addition of these flags has no impact on the behavior of the font in Mac or Windows environments.

Before (if applicable) and After Images of the Character(s)

[Before] Note the bottom right corner of the /u and the middle left of the /four:
91456992-e3cbca00-e851-11ea-8504-3b83c1eab1d7

[After] Displaying properly:
91591579-1e556580-e92b-11ea-9fc4-284c9aec4aaf

Note that this fix will only work on the cutting edge version of FreeType (to be 2.10.3). The current 2.10.2 stable version does not respect the flags.

For the interpolation error, before:
Screen Shot 2020-09-01 at 9 06 17 AM

After:
Screen Shot 2020-09-01 at 9 05 58 AM

Validation Steps Performed

Test font reviewed by the bug reporter and found to resolve the problem.
--< rendering checked in FontGoggles

aaronbell and others added 20 commits June 29, 2020 17:15
Decreased Bold weight, added anchors to lowercase Greek, updated GDEF feature builder. Added font linking to STAT.
Reduced weight of bold extreme for better alignment with Regular. Resolved some introduced bugs in hinting and glyph widths.
This reverts commit 25dc61a.
Updating code for the build process and adding in a separate hinting file for the PL glyphs.
Updates build script to include madig's modifications, plus adds static TTF export and autohinting using ttfautohint (if available). Also updated / renamed the Nerdfonts PL file.
- Adjusted box drawing characters for better alignment to the letters
- Added anchors to all alphabetic characters (also brevecomb-cy which was missing them)
- added a fi and fl ligature (and decompose them so they never show up :) )
- improved weight of horncomb (lowercase) in bold
Changing contour order for Extralight to resolve interpolation error
@aaronbell aaronbell changed the title Adding OVERLAP flag to simple / compound glyphs Adding OVERLAP flag to simple / compound glyphs and resolve interpolation error Sep 1, 2020
@DHowett
Copy link
Member

DHowett commented Sep 11, 2020

Should we be holding off on this because of the comment here:? googlefonts/ufo2ft#402

@aaronbell
Copy link
Collaborator Author

I don’t think so. The only downside to implementing the flag everywhere is that freetype will have slightly slower rendering speed. And if freetype eventually changes their approach to this, we can remove the flag implementation entirely. Or if ufo2ft implements it in a smart way, we can switch to that.

Either way it benefits users now to have the flag set.

@DHowett DHowett changed the title Adding OVERLAP flag to simple / compound glyphs and resolve interpolation error Adding OVERLAP flag to simple / compound glyphs, resolve interpolation error Sep 14, 2020
@DHowett DHowett changed the title Adding OVERLAP flag to simple / compound glyphs, resolve interpolation error Add OVERLAP flag to simple/compound glyphs, fix interpl. error Sep 14, 2020
@DHowett DHowett merged commit f9145d5 into microsoft:master Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants