FS#67746 - [ttf-cascadia-code] Some glyphs show artifacts due lack of overlap support in FreeType 2.10.2

Attached to Project: Community Packages
Opened by Ronan (ronjouch) - Friday, 28 August 2020, 18:18 GMT
Last edited by Konstantin Gizdov (kgizdov) - Wednesday, 21 April 2021, 15:13 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Konstantin Gizdov (kgizdov)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
This is a followup of upstream bugs
- Cascadia-Code: https://github.com/microsoft/cascadia-code/issues/350
- FreeType: https://savannah.nongnu.org/bugs/index.php?59026

, where I report that some glyphs of this particular font display visual glitches/artifacts (see screenshots in the issues).
After help from upstream maintainers, we realized this is a side-effect of three things:
1. Using a "variable" font bundle (multiple weights of a font in a single TTF file)
2. The font lacking OVERLAP_SIMPLE / OVERLAP_COMPOUND flags
3. Using FreeType < 2.10.3 (unreleased yet, the latest stable release upstream and in Arch is 2.10.2)

Under these circumstances, glitches happen. The problem will be fixed upstream with no change to the current packaging (using the variable TTF bundle) when:

A. CascadiaCode adds the missing OVERLAP_SIMPLE / OVERLAP_COMPOUND flags. They're in the process of doing so, see the GitHub issue
B. Arch ships the upcoming FreeType 2.10.3 with support for the flags.

But in the meantime, a workaround I've used successfully by fiddling with the pkgbuild is to package the *static* fonts, not the variable bundle:

```
package() {
cd "$srcdir"
install -Dm644 "ttf/static/CascadiaCode-Regular.ttf" "$pkgdir/usr/share/fonts/TTF/CascadiaRegular.ttf"
install -Dm644 "ttf/static/CascadiaCode-Bold.ttf" "$pkgdir/usr/share/fonts/TTF/CascadiaBold.ttf"
}
```

In the above patch, I'm packaging only the Regular and Bold weights, as these are the ones I need. Not sure if this is enough for other users, or if all the weights should be packaged.

Of course, the downside is slightly higher disk usage.

Additional info:
* package version: reproducible in both 2007.01 and 2008.25
This task depends upon

Closed by  Konstantin Gizdov (kgizdov)
Wednesday, 21 April 2021, 15:13 GMT
Reason for closing:  Upstream
Additional comments about closing:  fixed upstream
Comment by Konstantin Gizdov (kgizdov) - Wednesday, 21 April 2021, 14:49 GMT
is this still an issue?
Comment by Ronan (ronjouch) - Wednesday, 21 April 2021, 14:58 GMT
> Is this still an issue?

Hi Konstantin. No, this was doubly (see description) fixed upstream, please close. Thanks for the follow-up.

Loading...