google / google/fonts

Review diacritic shaping in Forum and Urbanist

Open
#9,333 8 comments 0 reactions 1 assignee Claimed by @simoncozens View on GitHub
I Font Bug
Dominant language
HTML
Stars
20.5k
Forks
2.9k
Avg merge
1d 21h
Merged PRs (30d)
95

Description

User report through the Fonts front end:

> Lot of fonts, for example Forum and Urbanist are damaged for the last 2 -3 weeks. Problem appears for latin-extended fonts.

for ā, ē, ū, ī, the stripe slips away.

Initial diagnostics from Garret:

1. e + macron combining mark are in latin.
2. e /w macron is in latin ext.
3. The way this font is built is that it doesn't have a specific substitution/positioning rule for e + combining macron. If a browser is using a full unsubsetted font and it sees a e + combining macron the shaper (eg. harfbuzz) will swap the two separate codepoints for the precomposed codepoint 0x113 (Latin Small Letter E with Macron) and things will look ok.
4. When the font gets split into two subsets (latin, latin ext) we have one subset which supports only e + combining macron and another which supports 0x113. So now if the browser sees e + combining macron it will correctly pick the latin subset however since this font lacks a substitution or positioning rules for the combining macron character the browser ends up rendering them as two distinct chars, the e followed by the overhead macron (and so it looks shifted).

This could very likely be fixed in the font by adding GSUB and/or GPOS rules for the combining mark. I see rules for the other combining marks so I wondered if this was just missed and not noticed in testing due to the automatic browser substitution masking the issue.

---

b/300927673

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.