Skip to content

Commit

Permalink
Ignore zero width glyphs (marks) in the monospace glyph warning
Browse files Browse the repository at this point in the history
com.google.fonts/check/monospace
(issue #3036)
  • Loading branch information
kontur authored Sep 24, 2020
1 parent e1e2c94 commit 42e872c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ A more detailed list of changes is available in the corresponding milestones for
- **[com.google.fonts/check/varfont/stat_axis_record_for_each_axis]**: ensure the STAT table has an Axis Record for every axis in the font (PR #3017)

### Changes to existing checks
- **[com.google.fonts/check/monospace]**: Updated to not report zero width (mark) glyphs (issue #3036)
- **[com.google.fonts/check/font_version]**: fixed tolerance for warnings (PR #3009)
- **[com.google.fonts/check/fontbakery_version]**: use pip_api module and PyPI JSON API instead of invoking command-line pip/pip3 via subprocess (#2966)

Expand Down
1 change: 1 addition & 0 deletions Lib/fontbakery/profiles/name.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ def com_google_fonts_check_monospace(ttFont, glyph_metrics_stats):
unusually_spaced_glyphs = [
g for g in ttFont['glyf'].glyphs
if g not in ['.notdef', '.null', 'NULL'] and
ttFont['hmtx'].metrics[g][0] != 0 and
ttFont['hmtx'].metrics[g][0] != most_common_width
]
outliers_ratio = float(len(unusually_spaced_glyphs)) / num_glyphs
Expand Down

0 comments on commit 42e872c

Please sign in to comment.