Skip to content

Commit a6a5e35

Browse files
committed
split the registering of checks between opentype and universal profiles
1 parent a2eb17c commit a6a5e35

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

profile-universal/src/lib.rs

+10-11
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,17 @@ pub struct Universal;
66

77
impl fontspector_checkapi::Plugin for Universal {
88
fn register(&self, cr: &mut Registry) -> Result<(), String> {
9-
cr.register_check(checks::arabic_spacing_symbols::arabic_spacing_symbols);
9+
10+
// For the OpenType profile:
1011
cr.register_check(checks::bold_italic_unique::bold_italic_unique);
1112
cr.register_check(checks::code_pages::code_pages);
1213
cr.register_check(checks::fvar::axis_ranges_correct);
1314
cr.register_check(checks::fvar::regular_coords_correct);
14-
cr.register_check(checks::glyphnames::valid_glyphnames);
15-
cr.register_check(checks::head::equal_font_versions);
16-
cr.register_check(checks::head::font_version);
17-
cr.register_check(checks::head::mac_style);
18-
cr.register_check(checks::head::unitsperem);
1915
cr.register_check(checks::hhea::caret_slope);
2016
cr.register_check(checks::hhea::maxadvancewidth);
21-
cr.register_check(checks::name_trailing_spaces::name_trailing_spaces);
22-
cr.register_check(checks::name::name_empty_records);
23-
cr.register_check(checks::os2::fsselection);
2417
cr.register_check(checks::post::post_table_version);
2518
cr.register_check(checks::post::underline_thickness);
26-
cr.register_check(checks::required_tables::required_tables);
2719
cr.register_check(checks::stat::stat_axis_record);
28-
cr.register_check(checks::unwanted_tables::unwanted_tables);
2920

3021
let opentype_profile = Profile::from_toml(
3122
r#"
@@ -114,6 +105,14 @@ impl fontspector_checkapi::Plugin for Universal {
114105
.map_err(|_| "Couldn't parse profile")?;
115106
cr.register_profile("opentype", opentype_profile)?;
116107

108+
// For the Universal profile:
109+
cr.register_check(checks::arabic_spacing_symbols::arabic_spacing_symbols);
110+
cr.register_check(checks::glyphnames::valid_glyphnames);
111+
cr.register_check(checks::name::name_empty_records);
112+
cr.register_check(checks::name_trailing_spaces::name_trailing_spaces);
113+
cr.register_check(checks::required_tables::required_tables);
114+
cr.register_check(checks::unwanted_tables::unwanted_tables);
115+
117116
let universal_profile = Profile::from_toml(
118117
r#"
119118
include_profiles = ["opentype"]

0 commit comments

Comments
 (0)