@@ -6,24 +6,152 @@ pub struct Universal;
6
6
7
7
impl fontspector_checkapi:: Plugin for Universal {
8
8
fn register ( & self , cr : & mut Registry ) -> Result < ( ) , String > {
9
- cr. register_check ( checks:: CHECK_NAME_TRAILING_SPACES ) ;
10
- cr. register_check ( checks:: CHECK_UNWANTED_TABLES ) ;
11
- cr. register_check ( checks:: CHECK_REQUIRED_TABLES ) ;
12
- cr. register_check ( checks:: CHECK_REGULAR_COORDS_CORRECT ) ;
13
- cr. register_check ( checks:: CHECK_VALID_GLYPHNAMES ) ;
14
- let profile = Profile :: from_toml (
9
+ cr. register_check ( checks:: fvar:: CHECK_AXIS_RANGES_CORRECT ) ;
10
+ cr. register_check ( checks:: fvar:: CHECK_REGULAR_COORDS_CORRECT ) ;
11
+ cr. register_check ( checks:: glyphnames:: CHECK_VALID_GLYPHNAMES ) ;
12
+ cr. register_check ( checks:: hhea:: CHECK_CARET_SLOPE ) ;
13
+ cr. register_check ( checks:: hhea:: CHECK_MAXADVANCEWIDTH ) ;
14
+ cr. register_check ( checks:: name_trailing_spaces:: CHECK_NAME_TRAILING_SPACES ) ;
15
+ cr. register_check ( checks:: name:: CHECK_NAME_EMPTY_RECORDS ) ;
16
+ cr. register_check ( checks:: required_tables:: CHECK_REQUIRED_TABLES ) ;
17
+ cr. register_check ( checks:: unwanted_tables:: CHECK_UNWANTED_TABLES ) ;
18
+
19
+ let opentype_profile = Profile :: from_toml (
20
+ r#"
21
+ [sections]
22
+ "OpenType Specification Checks" = [
23
+ "com.google.fonts/check/family/underline_thickness",
24
+ "com.google.fonts/check/family/panose_familytype",
25
+ "com.google.fonts/check/family/equal_font_versions",
26
+ "com.adobe.fonts/check/family/bold_italic_unique_for_nameid1",
27
+ "com.adobe.fonts/check/family/max_4_fonts_per_family_name",
28
+ "com.adobe.fonts/check/family/consistent_family_name",
29
+ "com.adobe.fonts/check/name/postscript_vs_cff",
30
+ "com.adobe.fonts/check/name/postscript_name_consistency",
31
+ "com.adobe.fonts/check/name/empty_records",
32
+ "com.google.fonts/check/name/no_copyright_on_description",
33
+ "com.google.fonts/check/name/match_familyname_fullfont",
34
+ "com.google.fonts/check/fvar/regular_coords_correct",
35
+ "com.google.fonts/check/fvar/axis_ranges_correct",
36
+ "com.google.fonts/check/varfont/stat_axis_record_for_each_axis",
37
+ "com.google.fonts/check/loca/maxp_num_glyphs",
38
+ "com.adobe.fonts/check/cff_ascii_strings",
39
+ "com.adobe.fonts/check/cff_call_depth",
40
+ "com.adobe.fonts/check/cff_deprecated_operators",
41
+ "com.adobe.fonts/check/cff2_call_depth",
42
+ "com.google.fonts/check/font_version",
43
+ "com.google.fonts/check/post_table_version",
44
+ "com.google.fonts/check/monospace",
45
+ "com.google.fonts/check/xavgcharwidth",
46
+ "com.adobe.fonts/check/fsselection_matches_macstyle",
47
+ "com.google.fonts/check/unitsperem",
48
+ "com.google.fonts/check/gdef_spacing_marks",
49
+ "com.google.fonts/check/gdef_mark_chars",
50
+ "com.google.fonts/check/gdef_non_mark_chars",
51
+ "com.google.fonts/check/gpos_kerning_info",
52
+ "com.google.fonts/check/kern_table",
53
+ "com.google.fonts/check/glyf_unused_data",
54
+ "com.google.fonts/check/family_naming_recommendations",
55
+ "com.google.fonts/check/maxadvancewidth",
56
+ "com.adobe.fonts/check/postscript_name",
57
+ "com.google.fonts/check/points_out_of_bounds",
58
+ "com.google.fonts/check/glyf_non_transformed_duplicate_components",
59
+ "com.google.fonts/check/code_pages",
60
+ "com.google.fonts/check/layout_valid_feature_tags",
61
+ "com.google.fonts/check/layout_valid_script_tags",
62
+ "com.google.fonts/check/layout_valid_language_tags",
63
+ "com.google.fonts/check/italic_angle",
64
+ "com.google.fonts/check/mac_style",
65
+ "com.google.fonts/check/fsselection",
66
+ "com.google.fonts/check/name/italic_names",
67
+ "com.adobe.fonts/check/varfont/valid_axis_nameid",
68
+ "com.adobe.fonts/check/varfont/valid_subfamily_nameid",
69
+ "com.adobe.fonts/check/varfont/valid_postscript_nameid",
70
+ "com.adobe.fonts/check/varfont/valid_default_instance_nameids",
71
+ "com.adobe.fonts/check/varfont/same_size_instance_records",
72
+ "com.adobe.fonts/check/varfont/distinct_instance_records",
73
+ "com.adobe.fonts/check/varfont/foundry_defined_tag_name",
74
+ "com.google.fonts/check/varfont/family_axis_ranges",
75
+ "com.adobe.fonts/check/stat_has_axis_value_tables",
76
+ "com.thetypefounders/check/vendor_id",
77
+ "com.google.fonts/check/caret_slope",
78
+ "com.google.fonts/check/italic_axis_in_stat",
79
+ "com.google.fonts/check/italic_axis_in_stat_is_boolean",
80
+ "com.google.fonts/check/italic_axis_last",
81
+ ]
82
+ "# ,
83
+ )
84
+ . map_err ( |_| "Couldn't parse profile" ) ?;
85
+ cr. register_profile ( "opentype" , opentype_profile) ?;
86
+
87
+ let universal_profile = Profile :: from_toml (
15
88
r#"
89
+ include_profiles = ["opentype"]
16
90
[sections]
91
+ #"Superfamily Checks" = [
92
+ # "com.google.fonts/check/superfamily/list",
93
+ # "com.google.fonts/check/superfamily/vertical_metrics",
94
+ #]
95
+ #"UFO Sources" = [
96
+ # # FIXME (orphan check): "com.daltonmaag/check/consistent_curve_type",
97
+ # # https://github.com/fonttools/fontbakery/pull/4809
98
+ # "com.google.fonts/check/designspace_has_sources",
99
+ # "com.google.fonts/check/designspace_has_default_master",
100
+ # "com.google.fonts/check/designspace_has_consistent_glyphset",
101
+ # "com.google.fonts/check/designspace_has_consistent_codepoints",
102
+ # "com.thetypefounders/check/features_default_languagesystem",
103
+ # # FIXME (orphan check): "com.daltonmaag/check/no_open_corners",
104
+ # "com.daltonmaag/check/ufolint",
105
+ # "com.daltonmaag/check/ufo_required_fields",
106
+ # "com.daltonmaag/check/ufo_recommended_fields",
107
+ # "com.daltonmaag/check/ufo_unnecessary_fields",
108
+ # "com.daltonmaag/check/designspace_has_consistent_groups",
109
+ #]
17
110
"Universal Profile Checks" = [
18
- "com.google.fonts/check/name/trailing_spaces",
19
- "com.google.fonts/check/unwanted_tables",
20
- "com.google.fonts/check/required_tables",
21
- "com.google.fonts/check/fvar/regular_coords_correct",
22
- "com.google.fonts/check/valid_glyphnames"
111
+ "com.google.fonts/check/alt_caron",
112
+ "com.google.fonts/check/arabic_high_hamza",
113
+ "com.google.fonts/check/arabic_spacing_symbols",
114
+ # "com.google.fonts/check/caps_vertically_centered", # Disabled: issue #4274
115
+ "com.google.fonts/check/case_mapping",
116
+ "com.google.fonts/check/cjk_chws_feature",
117
+ "com.google.fonts/check/contour_count",
118
+ "com.google.fonts/check/family/single_directory",
119
+ "com.google.fonts/check/family/vertical_metrics",
120
+ "com.google.fonts/check/family/win_ascent_and_descent",
121
+ "com.google.fonts/check/fontbakery_version",
122
+ "com.adobe.fonts/check/freetype_rasterizer",
123
+ "com.google.fonts/check/gpos7",
124
+ "com.google.fonts/check/gsub/smallcaps_before_ligatures",
125
+ "com.google.fonts/check/interpolation_issues",
126
+ "com.google.fonts/check/legacy_accents",
127
+ "com.google.fonts/check/linegaps",
128
+ "com.google.fonts/check/mandatory_glyphs",
129
+ "com.google.fonts/check/math_signs_width",
130
+ "com.google.fonts/check/name/trailing_spaces",
131
+ "com.google.fonts/check/os2_metrics_match_hhea",
132
+ "com.google.fonts/check/ots",
133
+ "com.google.fonts/check/required_tables",
134
+ "com.google.fonts/check/rupee",
135
+ "com.adobe.fonts/check/sfnt_version",
136
+ "com.google.fonts/check/soft_hyphen",
137
+ "com.google.fonts/check/STAT_in_statics",
138
+ "com.google.fonts/check/STAT_strings",
139
+ "com.google.fonts/check/tabular_kerning",
140
+ "com.google.fonts/check/transformed_components",
141
+ "com.google.fonts/check/ttx_roundtrip",
142
+ "com.arrowtype.fonts/check/typoascender_exceeds_Agrave",
143
+ "com.google.fonts/check/unique_glyphnames",
144
+ "com.google.fonts/check/unreachable_glyphs",
145
+ "com.google.fonts/check/unwanted_tables",
146
+ "com.google.fonts/check/valid_glyphnames",
147
+ "com.google.fonts/check/whitespace_glyphnames",
148
+ "com.google.fonts/check/whitespace_glyphs",
149
+ "com.google.fonts/check/whitespace_ink",
150
+ "com.google.fonts/check/whitespace_widths",
23
151
]
24
152
"# ,
25
153
)
26
154
. map_err ( |_| "Couldn't parse profile" ) ?;
27
- cr. register_profile ( "universal" , profile )
155
+ cr. register_profile ( "universal" , universal_profile )
28
156
}
29
157
}
0 commit comments