Skip to content

Commit

Permalink
Add rationale for a couple glyf table checks
Browse files Browse the repository at this point in the history
com.google.fonts/check/glyf_unused_data
com.google.fonts/check/points_out_of_bounds
On the Open Type Profile.

(PR #4570)
  • Loading branch information
simoncozens authored and felipesanches committed Mar 5, 2024
1 parent 519217c commit e30aec2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ A more detailed list of changes is available in the corresponding milestones for
- **[com.google.fonts/check/family/equal_unicode_encodings]:** Added rationale, even though this is a questionable check, which we may simply deprecate, as we're not sure why would we expect what it checks. (PR #4570)
- **[com.google.fonts/check/family/equal_font_versions]:** Added rationale. (PR #4570)
- **[com.google.fonts/check/font_version]:** Added rationale. (PR #4570)
- **[com.google.fonts/check/glyf_unused_data]:** Added rationale. (PR #4570)
- **[com.google.fonts/check/points_out_of_bounds]:** Added rationale. (PR #4570)


## 0.12.0a2 (2024-Feb-21)
Expand Down
13 changes: 13 additions & 0 deletions Lib/fontbakery/checks/opentype/glyf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@

@check(
id="com.google.fonts/check/glyf_unused_data",
rationale="""
This check validates the structural integrity of the glyf table,
by checking that all glyphs referenced in the loca table are
actually present in the glyf table and that there is no unused
data at the end of the glyf table. A failure here indicates a
problem with the font compiler.
""",
conditions=["is_ttf"],
proposal="legacy:check/069",
)
Expand Down Expand Up @@ -45,6 +52,12 @@ def com_google_fonts_check_glyf_unused_data(ttFont):
@check(
id="com.google.fonts/check/points_out_of_bounds",
conditions=["is_ttf"],
rationale="""
The glyf table specifies a bounding box for each glyph. This check
ensures that all points in all glyph paths are within the bounding
box. Glyphs with out-of-bounds points can cause rendering issues in
some software, and should be corrected.
""",
proposal="https://github.com/fonttools/fontbakery/issues/735",
)
def com_google_fonts_check_points_out_of_bounds(ttFont, config):
Expand Down

0 comments on commit e30aec2

Please sign in to comment.