Skip to content

Commit cf856a1

Browse files
committed
Comment out unfinished check
1 parent d5389fb commit cf856a1

File tree

3 files changed

+33
-39
lines changed

3 files changed

+33
-39
lines changed

fontspector-checkapi/src/font.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@ use read_fonts::{
88
types::Version16Dot16,
99
TableProvider,
1010
};
11-
use skrifa::{
12-
font::FontRef,
13-
string::{LocalizedStrings, StringId},
14-
GlyphId, MetadataProvider, Tag,
15-
};
11+
use skrifa::{font::FontRef, string::StringId, GlyphId, MetadataProvider, Tag};
1612
use std::{
1713
cell::RefCell,
1814
collections::{HashMap, HashSet},

profile-universal/src/checks/bold_italic_unique.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ use std::collections::HashSet;
22

33
use fontspector_checkapi::{prelude::*, FileTypeConvert};
44
use read_fonts::tables::os2::SelectionFlags;
5-
use skrifa::string::StringId;
65

76
#[check(
87
id = "opentype/family/bold_italic_unique_for_nameid1",

profile-universal/src/checks/name.rs

+32-33
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use font_types::NameId;
22
use fontspector_checkapi::{prelude::*, testfont, FileTypeConvert};
33
use read_fonts::TableProvider;
4-
use skrifa::MetadataProvider;
54

65
#[check(
76
id = "opentype/name/empty_records",
@@ -64,39 +63,39 @@ should be removed (perhaps these were added by a longstanding FontLab Studio
6463
return_result(problems)
6564
}
6665

67-
#[check(
68-
id = "opentype/name/match_familyname_fullfont",
69-
rationale = r#"
70-
The FULL_FONT_NAME entry in the ‘name’ table should start with the same string
71-
as the Family Name (FONT_FAMILY_NAME, TYPOGRAPHIC_FAMILY_NAME or
72-
WWS_FAMILY_NAME).
66+
// #[check(
67+
// id = "opentype/name/match_familyname_fullfont",
68+
// rationale = r#"
69+
// The FULL_FONT_NAME entry in the ‘name’ table should start with the same string
70+
// as the Family Name (FONT_FAMILY_NAME, TYPOGRAPHIC_FAMILY_NAME or
71+
// WWS_FAMILY_NAME).
7372

74-
If the Family Name is not included as the first part of the Full Font Name, and
75-
the user embeds the font in a document using a Microsoft Office app, the app
76-
will fail to render the font when it opens the document again.
73+
// If the Family Name is not included as the first part of the Full Font Name, and
74+
// the user embeds the font in a document using a Microsoft Office app, the app
75+
// will fail to render the font when it opens the document again.
7776

78-
NOTE: Up until version 1.5, the OpenType spec included the following exception
79-
in the definition of Full Font Name:
77+
// NOTE: Up until version 1.5, the OpenType spec included the following exception
78+
// in the definition of Full Font Name:
8079

81-
"An exception to the [above] definition of Full font name is for Microsoft
82-
platform strings for CFF OpenType fonts: in this case, the Full font name
83-
string must be identical to the PostScript FontName in the CFF Name INDEX."
80+
// "An exception to the [above] definition of Full font name is for Microsoft
81+
// platform strings for CFF OpenType fonts: in this case, the Full font name
82+
// string must be identical to the PostScript FontName in the CFF Name INDEX."
8483

85-
https://docs.microsoft.com/en-us/typography/opentype/otspec150/name#name-ids
86-
"#,
87-
proposal = "https://github.com/fonttools/fontbakery/issues/4829",
88-
title = "Does full font name begin with the font family name?"
89-
)]
90-
fn check_name_match_familyname_fullfont(t: &Testable, _context: &Context) -> CheckFnResult {
91-
let font = testfont!(t);
92-
// We actually care about localization here, so don't just want
93-
// a vec of String.
94-
let full_names = font.font().localized_strings(NameId::FULL_NAME);
95-
let family_names = font.font().localized_strings(NameId::FAMILY_NAME);
96-
let typographic_names = font
97-
.font()
98-
.localized_strings(NameId::TYPOGRAPHIC_FAMILY_NAME);
99-
let wws_names = font.font().localized_strings(NameId::WWS_FAMILY_NAME);
100-
// if full_names.len() {}
101-
return_result(vec![])
102-
}
84+
// https://docs.microsoft.com/en-us/typography/opentype/otspec150/name#name-ids
85+
// "#,
86+
// proposal = "https://github.com/fonttools/fontbakery/issues/4829",
87+
// title = "Does full font name begin with the font family name?"
88+
// )]
89+
// fn check_name_match_familyname_fullfont(t: &Testable, _context: &Context) -> CheckFnResult {
90+
// let font = testfont!(t);
91+
// // We actually care about localization here, so don't just want
92+
// // a vec of String.
93+
// let full_names = font.font().localized_strings(NameId::FULL_NAME);
94+
// let family_names = font.font().localized_strings(NameId::FAMILY_NAME);
95+
// let typographic_names = font
96+
// .font()
97+
// .localized_strings(NameId::TYPOGRAPHIC_FAMILY_NAME);
98+
// let wws_names = font.font().localized_strings(NameId::WWS_FAMILY_NAME);
99+
// // if full_names.len() {}
100+
// return_result(vec![])
101+
// }

0 commit comments

Comments
 (0)