Skip to content

Commit

Permalink
case_mapping: Dynamically exclude incomplete Greek glyphs.
Browse files Browse the repository at this point in the history
'case_mapping' check on Universal profile.

(PR #4721)
  • Loading branch information
yanone authored and felipesanches committed Sep 9, 2024
1 parent 0c1f34b commit a53a88c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Lib/fontbakery/checks/glyphset.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@ def check_case_mapping(ttFont):
EXCEPTIONS = [
0x0192, # ƒ - Latin Small Letter F with Hook
0x00B5, # µ - Micro Sign
0x03C0, # π - Greek Small Letter Pi
0x2126, # Ω - Ohm Sign
0x03BC, # μ - Greek Small Letter Mu
0x03A9, # Ω - Greek Capital Letter Omega
0x0394, # Δ - Greek Capital Letter Delta
0x0251, # ɑ - Latin Small Letter Alpha
0x0261, # ɡ - Latin Small Letter Script G
0x00FF, # ÿ - Latin Small Letter Y with Diaeresis
Expand All @@ -53,6 +49,13 @@ def check_case_mapping(ttFont):
0x026B, # ɫ - Latin Small Letter L with Middle Tilde
]

# Font has incomplete legacy Greek coverage, so ignore Greek dynamically
# (minimal Greek coverage is 2x24=48 characters, so we assume incomplete
# if coverage is less than half of 48)
greek = characters_per_script(ttFont, "Greek")
if 0 < len(greek) < 24:
EXCEPTIONS.extend(greek)

missing_counterparts_table = []
cmap = ttFont["cmap"].getBestCmap()
for codepoint in cmap:
Expand Down

0 comments on commit a53a88c

Please sign in to comment.