Skip to content

Commit

Permalink
Migrate render_own_name to GoogleFonts profile
Browse files Browse the repository at this point in the history
  • Loading branch information
felipesanches committed Jan 17, 2025
1 parent 426ddcc commit 6816fb5
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 13 deletions.
10 changes: 0 additions & 10 deletions fontspector-py/tests/test_checks_glyphset.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,6 @@ def test_check_missing_small_caps_glyphs():
# TODO: Implement-me!


@check_id("render_own_name")
def test_check_render_own_name(check):
"""Check family directory name."""
ttFont = TEST_FILE("overpassmono/OverpassMono-Regular.ttf")
assert_PASS(check(ttFont))

ttFont = TEST_FILE("noto_sans_tamil_supplement/NotoSansTamilSupplement-Regular.ttf")
assert_results_contain(check(ttFont), FAIL, "render-own-name")


@check_id("control_chars")
def test_check_family_control_chars(check):
"""Are any unacceptable control characters present in font files?"""
Expand Down
10 changes: 10 additions & 0 deletions fontspector-py/tests/test_checks_googlefonts.py
Original file line number Diff line number Diff line change
Expand Up @@ -3978,3 +3978,13 @@ def test_check_metadata_minisite_url(check):
"trailing-clutter",
"with a minisite_url with unnecessary trailing /index.html",
)


@check_id("googlefonts/render_own_name")
def test_check_render_own_name(check):
"""Check family directory name."""
ttFont = TEST_FILE("overpassmono/OverpassMono-Regular.ttf")
assert_PASS(check(ttFont))

ttFont = TEST_FILE("noto_sans_tamil_supplement/NotoSansTamilSupplement-Regular.ttf")
assert_results_contain(check(ttFont), FAIL, "render-own-name")
2 changes: 1 addition & 1 deletion profile-googlefonts/src/checks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ pub mod axes_match;
pub mod color_fonts;
pub mod fstype;
pub mod name_description_max_length;
pub mod render_own_name;
pub mod tofu;

1 change: 1 addition & 0 deletions profile-googlefonts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ impl fontspector_checkapi::Plugin for GoogleFonts {
cr.register_check(metadata_subsets_correct::metadata_subsets_correct);
cr.register_check(metadata_copyright::metadata_copyright);
cr.register_check(metadata_license::metadata_license);
cr.register_check(render_own_name::render_own_name);
cr.register_check(use_typo_metrics::os2_fsselectionbit7);
let profile = Profile::from_toml(
r#"
Expand Down
2 changes: 0 additions & 2 deletions profile-universal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ impl fontspector_checkapi::Plugin for Universal {
cr.register_check(checks::name_trailing_spaces::name_trailing_spaces);
cr.register_check(checks::no_mac_entries::no_mac_entries);
cr.register_check(checks::os2_metrics_match_hhea::os2_metrics_match_hhea);
cr.register_check(checks::render_own_name::render_own_name);
cr.register_check(checks::required_tables::required_tables);
cr.register_check(checks::sfnt_version::sfnt_version);
cr.register_check(checks::smallcaps_before_ligatures::smallcaps_before_ligatures);
Expand Down Expand Up @@ -147,7 +146,6 @@ include_profiles = ["opentype"]
"nested_components",
"no_mac_entries",
"os2_metrics_match_hhea",
"render_own_name",
"required_tables",
"rupee",
"sfnt_version",
Expand Down

0 comments on commit 6816fb5

Please sign in to comment.