Skip to content

Commit 4fdc7c5

Browse files
authored
Merge pull request #6 from felipesanches/new_check_ids
update check-IDs following FontBakery's new naming scheme
2 parents d99e80d + d48de7a commit 4fdc7c5

18 files changed

+218
-177
lines changed

fontspector-web/www/index.js

+23-26
Original file line numberDiff line numberDiff line change
@@ -23,38 +23,35 @@ const BABELFONT = NOWASM(
2323
);
2424
const EXCUSES = {
2525
// Needs dependencies
26-
"com.adobe.fonts/check/freetype_rasterizer": CANT_COMPILE("Freetype"),
27-
"com.google.fonts/check/ots": CANT_COMPILE("OpenType Sanitizer"),
28-
"com.google.fonts/check/alt_caron:googlefonts": BABELFONT,
29-
"com.google.fonts/check/alt_caron": BABELFONT,
30-
"com.google.fonts/check/arabic_high_hamza": BABELFONT,
31-
"com.google.fonts/check/arabic_spacing_symbols": BABELFONT,
32-
"com.google.fonts/check/legacy_accents:googlefonts": BABELFONT,
26+
"freetype_rasterizer": CANT_COMPILE("Freetype"),
27+
"ots": CANT_COMPILE("OpenType Sanitizer"),
28+
"alt_caron:googlefonts": BABELFONT,
29+
"alt_caron": BABELFONT,
30+
"arabic_high_hamza": BABELFONT,
31+
"arabic_spacing_symbols": BABELFONT,
32+
"legacy_accents": BABELFONT,
3333
// Needs network
34-
"com.google.fonts/check/vendor_id": NEEDS_NETWORK,
35-
"com.google.fonts/check/fontdata_namecheck": NEEDS_NETWORK,
36-
"com.google.fonts/check/vertical_metrics_regressions": NEEDS_NETWORK,
37-
"com.google.fonts/check/metadata/includes_production_subsets": NEEDS_NETWORK,
38-
"com.google.fonts/check/metadata/designer_profiles": NEEDS_NETWORK,
39-
"com.google.fonts/check/description/broken_links": NEEDS_NETWORK,
40-
"com.google.fonts/check/metadata/broken_links": NEEDS_NETWORK,
41-
"com.google.fonts/check/version_bump": NEEDS_NETWORK,
42-
"com.google.fonts/check/production_glyphs_similarity": NEEDS_NETWORK,
34+
"googlefonts/vendor_id": NEEDS_NETWORK,
35+
"fontdata_namecheck": NEEDS_NETWORK,
36+
"googlefonts/vertical_metrics_regressions": NEEDS_NETWORK,
37+
"googlefonts/metadata/includes_production_subsets": NEEDS_NETWORK,
38+
"googlefonts/metadata/designer_profiles": NEEDS_NETWORK,
39+
"googlefonts/description/broken_links": NEEDS_NETWORK,
40+
"googlefonts/metadata/broken_links": NEEDS_NETWORK,
41+
"googlefonts/version_bump": NEEDS_NETWORK,
42+
"googlefonts/production_glyphs_similarity": NEEDS_NETWORK,
4343
// Shaping checks
44-
"com.google.fonts/check/render_own_name": CANT_COMPILE("Freetype"),
45-
"com.google.fonts/check/dotted_circle": CANT_COMPILE(
46-
"cffsubr [required by ufo2ft]"
47-
),
48-
"com.google.fonts/check/metadata/can_render_samples":
49-
CANT_COMPILE("Harfbuzz"),
50-
"com.google.fonts/check/slant_direction": CANT_COMPILE("Harfbuzz"),
51-
"com.google.fonts/check/glyphsets/shape_languages": CANT_COMPILE("Harfbuzz"),
44+
"render_own_name": CANT_COMPILE("Freetype"),
45+
"dotted_circle": CANT_COMPILE("cffsubr [required by ufo2ft]"),
46+
"googlefonts/metadata/can_render_samples": CANT_COMPILE("Harfbuzz"),
47+
"opentype/slant_direction": CANT_COMPILE("Harfbuzz"),
48+
"googlefonts/glyphsets/shape_languages": CANT_COMPILE("Harfbuzz"),
5249

5350
// Other checks
54-
"com.google.fonts/check/metadata/family_directory_name": NOWASM(
51+
"googlefonts/metadata/family_directory_name": NOWASM(
5552
"there are no directories in the WASM environment"
5653
),
57-
"com.google.fonts/check/ttx_roundtrip": NOWASM(
54+
"ttx_roundtrip": NOWASM(
5855
"the WASM environment does not support calling other processes"
5956
),
6057
};

fontspector-web/www/webworker.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ async function init() {
66
console.log("Loaded");
77
self.postMessage({ ready: true });
88
const EXCLUDE_CHECKS = [
9-
"com.google.fonts/check/fontbakery_version", // We download the latest each time
10-
"com.daltonmaag/check/ufo_required_fields",
11-
"com.daltonmaag/check/ufo_recommended_fields",
12-
"com.google.fonts/check/designspace_has_sources",
13-
"com.google.fonts/check/designspace_has_default_master",
14-
"com.google.fonts/check/designspace_has_consistent_glyphset",
15-
"com.google.fonts/check/designspace_has_consistent_codepoints",
16-
"com.google.fonts/check/shaping/regression",
17-
"com.google.fonts/check/shaping/forbidden",
18-
"com.google.fonts/check/shaping/collides",
19-
"com.google.fonts/check/fontv", // Requires a subprocess
9+
"fontbakery_version", // We download the latest each time
10+
"ufo_required_fields",
11+
"ufo_recommended_fields",
12+
"designspace_has_sources",
13+
"designspace_has_default_master",
14+
"designspace_has_consistent_glyphset",
15+
"designspace_has_consistent_codepoints",
16+
"shaping/regression",
17+
"shaping/forbidden",
18+
"shaping/collides",
19+
"fontv", // Requires a subprocess
2020
];
2121

2222
self.onmessage = async (event) => {

profile-googlefonts/src/family.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::collections::HashSet;
44
use fontspector_checkapi::{prelude::*, FileTypeConvert};
55

66
#[check(
7-
id = "com.google.fonts/check/family/equal_codepoint_coverage",
7+
id = "googlefonts/family/equal_codepoint_coverage",
88
title = "Fonts have equal codepoint coverage?",
99
rationale = "For a given family, all fonts must have the same codepoint coverage.
1010
This is because we want to avoid the situation where, for example,

profile-googlefonts/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ impl fontspector_checkapi::Plugin for GoogleFonts {
1616
include_profiles = ["universal"]
1717
[sections]
1818
"Metadata Checks" = [
19-
"com.google.fonts/check/metadata/parses",
20-
"com.google.fonts/check/metadata/can_render_samples",
19+
"googlefonts/metadata/parses",
20+
"googlefonts/metadata/can_render_samples",
2121
]
2222
"Family Checks" = [
23-
"com.google.fonts/check/family/equal_codepoint_coverage"
23+
"googlefonts/family/equal_codepoint_coverage"
2424
]
2525
"#,
2626
)

profile-googlefonts/src/metadata.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fn family_proto(t: &Testable) -> Result<FamilyProto, CheckError> {
1414
}
1515

1616
#[check(
17-
id = "com.google.fonts/check/metadata/parses",
17+
id = "googlefonts/metadata/parses",
1818
title = "Check METADATA.pb parses correctly",
1919
rationale = "
2020
The purpose of this check is to ensure that the METADATA.pb file is not
@@ -57,7 +57,7 @@ fn validate_metadatapb(c: &Testable, _context: &Context) -> CheckFnResult {
5757
}
5858

5959
#[check(
60-
id = "com.google.fonts/check/metadata/can_render_samples",
60+
id = "googlefonts/metadata/can_render_samples",
6161
title = "Check samples can be rendered",
6262
rationale = "
6363
In order to prevent tofu from being seen on fonts.google.com, this check

profile-testplugin/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use fontspector_checkapi::prelude::*;
44
struct Test;
55

66
#[check(
7-
id = "com.google.fonts/check/test/say_hello",
7+
id = "test/say_hello",
88
title = "Check that the plugin protocol is working",
99
rationale = "This check is part of the example of how to create plugins.",
1010
proposal = "https://github.com/simoncozens/fontspector/commit/5fdf9750991176c8e2776557ce6c17c642c24a73"
@@ -16,7 +16,7 @@ fn say_hello(_c: &Testable, context: &Context) -> CheckFnResult {
1616
}
1717

1818
#[check(
19-
id = "com.google.fonts/check/test/validate_toml",
19+
id = "test/validate_toml",
2020
title = "Check that the filetype plugin protocol is working",
2121
rationale = "This check is part of the example of how to create plugins.",
2222
proposal = "https://github.com/simoncozens/fontspector/commit/5fdf9750991176c8e2776557ce6c17c642c24a73",

profile-universal/src/checks/arabic_spacing_symbols.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const ARABIC_SPACING_SYMBOLS: [u16; 17] = [
2222
];
2323

2424
#[check(
25-
id = "com.google.fonts/check/arabic_spacing_symbols",
25+
id = "arabic_spacing_symbols",
2626
title = "Check that Arabic spacing symbols U+FBB2–FBC1 aren't classified as marks.",
2727
rationale = "
2828
Unicode has a few spacing symbols representing Arabic dots and other marks,

profile-universal/src/checks/bold_italic_unique.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
// return_result(problems)
4141
// }
4242
// pub const BOLD_ITALIC_UNIQUE_CHECK: Check = Check {
43-
// id: "com.adobe.fonts/check/family/bold_italic_unique_for_nameid1",
43+
// id: "opentype/family/bold_italic_unique_for_nameid1",
4444
// title: "Check that OS/2.fsSelection bold & italic settings are unique for each NameID1",
4545
// rationale: None,
4646
// proposal: Some("https://github.com/googlefonts/fontbakery/pull/2388"),

profile-universal/src/checks/fvar.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const REGULAR_COORDINATE_EXPECTATIONS: [(&str, f32); 4] = [
99
];
1010

1111
#[check(
12-
id = "com.google.fonts/check/fvar/regular_coords_correct",
12+
id = "opentype/fvar/regular_coords_correct",
1313
title = "Axes and named instances fall within correct ranges?",
1414
rationale = "According to the Open-Type spec's registered design-variation tags, instances in a variable font should have certain prescribed values.
1515
If a variable font has a 'wght' (Weight) axis, the valid coordinate range is 1-1000.
@@ -59,7 +59,7 @@ fn regular_coords_correct(t: &Testable, _context: &Context) -> CheckFnResult {
5959
}
6060

6161
#[check(
62-
id = "com.google.fonts/check/fvar/axis_ranges_correct",
62+
id = "opentype/fvar/axis_ranges_correct",
6363
title = "Axes and named instances fall within correct ranges?",
6464
rationale = "According to the Open-Type spec's registered design-variation tags, instances in a variable font should have certain prescribed values.
6565
If a variable font has a 'wght' (Weight) axis, the valid coordinate range is 1-1000.

profile-universal/src/checks/glyphnames.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ fn test_glyph_name(s: &str) -> NameValidity {
3030
}
3131

3232
#[check(
33-
id = "com.google.fonts/check/valid_glyphnames",
33+
id = "valid_glyphnames",
3434
title = "Glyph names are all valid?",
3535
rationale = "Microsoft's recommendations for OpenType Fonts states the following:
3636

profile-universal/src/checks/hhea.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use fontspector_checkapi::{prelude::*, testfont, FileTypeConvert};
22
use read_fonts::TableProvider;
33

44
#[check(
5-
id = "com.google.fonts/check/maxadvancewidth",
5+
id = "opentype/maxadvancewidth",
66
title = "MaxAdvanceWidth is consistent with values in the Hmtx and Hhea tables?",
77
rationale = "The 'hhea' table contains a field which specifies the maximum advance width. This value should be consistent with the maximum advance width of all glyphs specified in the 'hmtx' table.",
88
proposal = "legacy:check/073"
@@ -32,7 +32,7 @@ fn maxadvancewidth(t: &Testable, _context: &Context) -> CheckFnResult {
3232
}
3333

3434
#[check(
35-
id = "com.google.fonts/check/caret_slope",
35+
id = "opentype/caret_slope",
3636
title = "Check hhea.caretSlopeRise and hhea.caretSlopeRun",
3737
proposal = "https://github.com/fonttools/fontbakery/issues/3670",
3838
rationale = r#"

profile-universal/src/checks/name.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use fontspector_checkapi::{prelude::*, testfont, FileTypeConvert};
22
use read_fonts::TableProvider;
33

44
#[check(
5-
id = "com.google.fonts/check/name/empty_records",
5+
id = "opentype/name/empty_records",
66
title = "Check name table for empty records.",
77
rationale = "Check the name table for empty records, as this can cause problems in Adobe apps.",
88
proposal = "https://github.com/fonttools/fontbakery/pull/2369"

profile-universal/src/checks/name_trailing_spaces.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use fontspector_checkapi::{prelude::*, testfont, FileTypeConvert};
22
use read_fonts::TableProvider;
33

44
#[check(
5-
id = "com.google.fonts/check/name/trailing_spaces",
5+
id = "name/trailing_spaces",
66
title = "Name table records must not have trailing spaces.",
77
rationale = "This check ensures that no entries in the name table end in spaces;
88
trailing spaces, particularly in font names, can be confusing to users.

profile-universal/src/checks/post.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use itertools::Itertools;
66
use read_fonts::TableProvider;
77

88
#[check(
9-
id = "com.google.fonts/check/family/underline_thickness",
9+
id = "opentype/family/underline_thickness",
1010
title = "Fonts have consistent underline thickness?",
1111
rationale = r#"
1212
Dave C Lemon (Adobe Type Team) recommends setting the underline thickness to be
@@ -52,7 +52,7 @@ fn underline_thickness(c: &TestableCollection, _context: &Context) -> CheckFnRes
5252
}
5353

5454
#[check(
55-
id = "com.google.fonts/check/post_table_version",
55+
id = "opentype/post_table_version",
5656
rationale = r#"
5757
Format 2.5 of the 'post' table was deprecated in OpenType 1.3 and
5858
should not be used.

profile-universal/src/checks/required_tables.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const OPTIONAL_TABLE_TAGS: [&[u8; 4]; 20] = [
66
];
77

88
#[check(
9-
id = "com.google.fonts/check/required_tables",
9+
id = "required_tables",
1010
title = "Font contains all required tables?",
1111
rationale = "
1212
According to the OpenType spec
@@ -58,7 +58,7 @@ fn required_tables(t: &Testable, _context: &Context) -> CheckFnResult {
5858
// required tables above. Perhaps split it into individual checks
5959
// with the correspondent rationales for each subset of required tables.
6060
//
61-
// com.google.fonts/check/kern_table is a good example of a separate
61+
// opentype/kern_table is a good example of a separate
6262
// check for a specific table providing a detailed description of
6363
// the rationale behind it.
6464

profile-universal/src/checks/stat.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use read_fonts::TableProvider;
55
use skrifa::MetadataProvider;
66

77
#[check(
8-
id = "com.google.fonts/check/varfont/stat_axis_record_for_each_axis",
8+
id = "opentype/varfont/stat_axis_record_for_each_axis",
99
rationale = "
1010
According to the OpenType spec, there must be an Axis Record
1111
for every axis defined in the fvar table.

profile-universal/src/checks/unwanted_tables.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The current recommendation is to completely remove the DSIG table."),
1616
];
1717

1818
#[check(
19-
id = "com.google.fonts/check/unwanted_tables",
19+
id = "unwanted_tables",
2020
title = "Are there unwanted tables?",
2121
rationale = "Some font editors store source data in their own SFNT tables, and these can sometimes sneak into final release files, which should only have OpenType spec tables.",
2222
proposal = "legacy:check/053",

0 commit comments

Comments
 (0)