Debian Codegraph @

src/lib.rs

raw symbols SCIP
1 use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::{collectionsrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/::HashSetrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/HashSet#, opsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/::Indexrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#};
2
3 #[cfg(feature = "fontations")]
4 use fontationsrust-analyzer cargo fontations 0.2.0 crate/::skrifarust-analyzer cargo skrifa 0.32.0 crate/::stringrust-analyzer cargo skrifa 0.32.0 string/::StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#;
5 #[cfg(feature = "fontations")]
6 use fontationsrust-analyzer cargo fontations 0.2.0 crate/::{
7 readrust-analyzer cargo read-fonts 0.30.1 crate/::FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#,
8 readrust-analyzer cargo read-fonts 0.30.1 crate/::{ReadErrorrust-analyzer cargo read-fonts 0.30.1 read/ReadError#, TableProviderrust-analyzer cargo read-fonts 0.30.1 table_provider/TableProvider#},
9 writerust-analyzer cargo write-fonts 0.39.0 crate/::FontBuilderrust-analyzer cargo write-fonts 0.39.0 font_builder/FontBuilder#,
10 };
11 use indexmaprust-analyzer cargo indexmap 2.9.0 crate/::IndexMaprust-analyzer cargo indexmap 2.9.0 map/IndexMap#;
12
13 includerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/include!!(concatrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/concat!!(envrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/env!!("OUT_DIR"), "/_.rs"));
14 includerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/include!!(concatrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/concat!!(envrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/env!!("OUT_DIR"), "/data.rs"));
15
16 const LINKED_VALUESrust-analyzer cargo google-fonts-axisregistry 0.4.15 LINKED_VALUES.: [(&str, (f32, f32)); 2] = [("wght", (400.0, 700.0)), ("ital", (0.0, 1.0))];
17
18 fn linked_valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 linked_value().(axis: &str, value: f32) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<f32> {
19 LINKED_VALUESrust-analyzer cargo google-fonts-axisregistry 0.4.15 LINKED_VALUES.
20 .iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().()
21 .findrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/impl#[`Iter<'a, T>`][Iterator]find().(|(linked_axis, (cur, _link))| *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().linked_axis rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq().axis && value rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f32][`PartialEq<Self>`]eq().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().cur)
22 .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]map().(|(_, (_, link))| *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().link)
23 }
24
25 const GF_STATIC_STYLESrust-analyzer cargo google-fonts-axisregistry 0.4.15 GF_STATIC_STYLES.: [(&str, u16); 18] = [
26 ("Thin", 100),
27 ("ExtraLight", 200),
28 ("Light", 300),
29 ("Regular", 400),
30 ("Medium", 500),
31 ("SemiBold", 600),
32 ("Bold", 700),
33 ("ExtraBold", 800),
34 ("Black", 900),
35 ("Thin Italic", 100),
36 ("ExtraLight Italic", 200),
37 ("Light Italic", 300),
38 ("Italic", 400),
39 ("Medium Italic", 500),
40 ("SemiBold Italic", 600),
41 ("Bold Italic", 700),
42 ("ExtraBold Italic", 800),
43 ("Black Italic", 900),
44 ];
45
46 #[cfg(feature = "fontations")]
47 const PROTECTED_IDSrust-analyzer cargo google-fonts-axisregistry 0.4.15 PROTECTED_IDS.: [StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#; 9] = [
48 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FAMILY_NAME.,
49 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]SUBFAMILY_NAME.,
50 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::UNIQUE_IDrust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]UNIQUE_ID.,
51 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FULL_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FULL_NAME.,
52 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::VERSION_STRINGrust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]VERSION_STRING.,
53 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::POSTSCRIPT_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]POSTSCRIPT_NAME.,
54 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_FAMILY_NAME.,
55 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_SUBFAMILY_NAME.,
56 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::VARIATIONS_POSTSCRIPT_NAME_PREFIXrust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]VARIATIONS_POSTSCRIPT_NAME_PREFIX.,
57 ];
58
59 pub struct AxisRegistryrust-analyzer cargo google-fonts-axisregistry 0.4.15 AxisRegistry# {
60 axesrust-analyzer cargo google-fonts-axisregistry 0.4.15 AxisRegistry#axes.: BTreeMap<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<AxisProto>>,
61 }
62
63 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:)]
64 pub struct FontAxisrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis# {
65 pub tagrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#tag.: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#,
66 pub minrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#min.: f32,
67 pub maxrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#max.: f32,
68 pub defaultrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#default.: f32,
69 }
70
71 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:)]
72 pub struct NameParticlerust-analyzer cargo google-fonts-axisregistry 0.4.15 NameParticle# {
73 pub namerust-analyzer cargo google-fonts-axisregistry 0.4.15 NameParticle#name.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>,
74 pub valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 NameParticle#value.: f32,
75 pub elidedrust-analyzer cargo google-fonts-axisregistry 0.4.15 NameParticle#elided.: bool,
76 }
77
78 impl AxisRegistryrust-analyzer cargo google-fonts-axisregistry 0.4.15 AxisRegistry# {
79 pub fn newrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]new().() -> Selfrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry] {
80 Selfrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry] {
81 axesrust-analyzer cargo google-fonts-axisregistry 0.4.15 AxisRegistry#axes.: (*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/Deref#deref().AXES).clone(),
82 }
83 }
84
85 pub fn getrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]get().(&self, tag: &str) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&AxisProto> {
86 self.axesrust-analyzer cargo google-fonts-axisregistry 0.4.15 AxisRegistry#axes..get(tag).map(|v| &*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/Deref#deref().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/Deref#deref().v)
87 }
88
89 pub fn contains_keyrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]contains_key().(&self, tag: &str) -> bool {
90 self.axesrust-analyzer cargo google-fonts-axisregistry 0.4.15 AxisRegistry#axes..contains_key(tag)
91 }
92
93 pub fn iterrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]iter().(&self) -> impl Iteratorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#<Itemrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#Item# = (&Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, &AxisProto)> {
94 self.axesrust-analyzer cargo google-fonts-axisregistry 0.4.15 AxisRegistry#axes..iter().map(|(k, v)| (k, &*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/Deref#deref().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/Deref#deref().v))
95 }
96
97 pub fn get_fallbackrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]get_fallback().<'a>(&'a self, name: &str) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<(&'a str, &'a FallbackProto)> {
98 self.axesrust-analyzer cargo google-fonts-axisregistry 0.4.15 AxisRegistry#axes.
99 .iter()
100 .flat_map(|(tag, axis)| {
101 let fallback = axis
102 .fallback
103 .iter()
104 .find(|f| f.name.as_deref() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#eq().Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(name));
105 fallback.map(|f| (tag.as_str(), f))
106 })
107 .next()
108 }
109
110 // This is fallbacks_in_fvar, but without assuming any particular font representation
111 pub fn fallbacksrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]fallbacks().<'a>(
112 &'a self,
113 font_axes: &'a [FontAxisrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#],
114 ) -> impl Iteratorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#<Itemrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#Item# = (Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<FallbackProto>)> + 'a {
115 font_axes.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().filter_maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#filter_map().(|axis| {
116 self.getrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]get().(&axis.tagrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#tag.).map(|registry_axis| {
117 (
118 registry_axis.tag.clone().unwrap_or_default(),
119 registry_axis
120 .fallback
121 .iter()
122 .filter(|f| f.value() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#ge().axis.minrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#min. && f.value() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#le().axis.maxrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#max.)
123 .cloned()
124 .collect(),
125 )
126 })
127 })
128 }
129
130 // This is fallbacks_in_name_table, but without assuming any particular font representation
131 pub fn name_table_fallbacksrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]name_table_fallbacks().<'a>(
132 &'a self,
133 family_name: &'a str,
134 subfamily_name: &'a str,
135 font_axes: &'a [FontAxisrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#],
136 ) -> impl Iteratorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#<Itemrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#Item# = (&'a str, &'a FallbackProto)> + 'a {
137 let axis_names: HashSetrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/HashSet#<&str> = font_axes.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|axis| axis.tagrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#tag..as_refrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`AsRef<str>`]as_ref().()).collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().();
138 let tokens = family_name
139 .split_whitespacerust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]split_whitespace().()
140 .skiprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#skip().(1)
141 .chainrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#chain().(subfamily_name.split_whitespacerust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]split_whitespace().());
142 tokens
143 .flat_maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#flat_map().(|token| self.get_fallbackrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]get_fallback().(token))
144 .filter(move |(tag, _)| !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().axis_names.containsrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]contains().(tag))
145 }
146
147 pub fn fallback_for_valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]fallback_for_value().<'a>(
148 &'a self,
149 axis_tag: &str,
150 value: f32,
151 ) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a FallbackProto> {
152 self.getrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]get().(axis_tag)
153 .and_then(|axis| axis.fallback.iter().find(|f| f.value rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#eq().Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(value)))
154 }
155
156 pub fn axis_orderrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]axis_order().(&self) -> Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<&str> {
157 let mut axis_tags: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<&str> = self
158 .axesrust-analyzer cargo google-fonts-axisregistry 0.4.15 AxisRegistry#axes.
159 .keys()
160 .filter(|k| k.chars().all(|c| c.is_ascii_uppercase()))
161 .map(|k| k.as_str())
162 .collect();
163 axis_tags.sortrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/impl#[`[T]`]sort().();
164 axis_tags.extendrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Extend<T>`]extend().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!!["opsz", "wdth", "wght", "ital", "slnt"]);
165 axis_tags
166 }
167
168 // This is the old "_fvar_dflts"
169 pub fn name_particlesrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]name_particles().<'a>(&self, font_axes: &'a [FontAxisrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#]) -> IndexMaprust-analyzer cargo indexmap 2.9.0 map/IndexMap#<&'a str, NameParticlerust-analyzer cargo google-fonts-axisregistry 0.4.15 NameParticle#> {
170 let mut particles = IndexMaprust-analyzer cargo indexmap 2.9.0 map/IndexMap#::newrust-analyzer cargo indexmap 2.9.0 map/impl#[`IndexMap<K, V>`]new().();
171 for axis in font_axes {
172 if axis.tagrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#tag. rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`PartialEq<&str>`]eq().==rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`PartialEq<&str>`]eq(). rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`PartialEq<&str>`]eq()."opsz" {
173 particles.insertrust-analyzer cargo indexmap 2.9.0 map/impl#[`IndexMap<K, V, S>`]insert().(
174 "opsz",
175 NameParticlerust-analyzer cargo google-fonts-axisregistry 0.4.15 NameParticle# {
176 namerust-analyzer cargo google-fonts-axisregistry 0.4.15 NameParticle#name.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("{}pt", axis.defaultrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#default.)),
177 valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 NameParticle#value.: axis.defaultrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#default.,
178 elidedrust-analyzer cargo google-fonts-axisregistry 0.4.15 NameParticle#elided.: true,
179 },
180 );
181 } else if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(fallback) = self.fallback_for_valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]fallback_for_value().(&axis.tagrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#tag., axis.defaultrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#default.) {
182 particles.insertrust-analyzer cargo indexmap 2.9.0 map/impl#[`IndexMap<K, V, S>`]insert().(
183 &axis.tagrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#tag.,
184 NameParticlerust-analyzer cargo google-fonts-axisregistry 0.4.15 NameParticle# {
185 namerust-analyzer cargo google-fonts-axisregistry 0.4.15 NameParticle#name.: fallback.name.clone(),
186 valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 NameParticle#value.: axis.defaultrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#default.,
187 elidedrust-analyzer cargo google-fonts-axisregistry 0.4.15 NameParticle#elided.: (fallback.value() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#eq().self.getrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]get().(&axis.tagrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#tag.).unwrap().default_value())
188 && !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().(["Regular", "Italic", "14pt"].containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]contains().(&fallback.name())),
189 },
190 );
191 } else {
192 particles.insertrust-analyzer cargo indexmap 2.9.0 map/impl#[`IndexMap<K, V, S>`]insert().(
193 &axis.tagrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#tag.,
194 NameParticlerust-analyzer cargo google-fonts-axisregistry 0.4.15 NameParticle# {
195 namerust-analyzer cargo google-fonts-axisregistry 0.4.15 NameParticle#name.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
196 valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 NameParticle#value.: axis.defaultrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#default.,
197 elidedrust-analyzer cargo google-fonts-axisregistry 0.4.15 NameParticle#elided.: true,
198 },
199 );
200 };
201 }
202 particles
203 }
204 }
205
206 impl Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default# for AxisRegistryrust-analyzer cargo google-fonts-axisregistry 0.4.15 AxisRegistry# {
207 fn defaultrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry][Default]default().() -> Selfrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry][Default] {
208 Selfrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry][Default]::newrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]new().()
209 }
210 }
211
212 impl Indexrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#<&str> for AxisRegistryrust-analyzer cargo google-fonts-axisregistry 0.4.15 AxisRegistry# {
213 type Outputrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry][`Index<&str>`]Output# = AxisProto;
214
215 fn indexrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry][`Index<&str>`]index().(&self, tag: &str) -> &Selfrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry][`Index<&str>`]::Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#Output# {
216 self.getrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]get().(tag).expect("No such axis")
217 }
218 }
219
220 #[cfg(feature = "fontations")]
221 mod monkeypatchingrust-analyzer cargo google-fonts-axisregistry 0.4.15 monkeypatching/;
222 #[cfg(feature = "fontations")]
223 mod nametablerust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/;
224 #[cfg(feature = "fontations")]
225 mod statrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/;
226 #[cfg(feature = "fontations")]
227 mod fontations_implrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/ {
228 use superrust-analyzer cargo google-fonts-axisregistry 0.4.15 crate/::*;
229 use fontationsrust-analyzer cargo fontations 0.2.0 crate/::{
230 skrifarust-analyzer cargo skrifa 0.32.0 crate/::{stringrust-analyzer cargo skrifa 0.32.0 string/::StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#, MetadataProviderrust-analyzer cargo skrifa 0.32.0 provider/MetadataProvider#, Tagrust-analyzer cargo font-types 0.9.0 tag/Tag#},
231 writerust-analyzer cargo write-fonts 0.39.0 crate/::{
232 from_objrust-analyzer cargo write-fonts 0.39.0 from_obj/::ToOwnedTablerust-analyzer cargo write-fonts 0.39.0 from_obj/ToOwnedTable#,
233 tablesrust-analyzer cargo write-fonts 0.39.0 tables/::{
234 fvarrust-analyzer cargo write-fonts 0.39.0 tables/fvar/::{Fvarrust-analyzer cargo write-fonts 0.39.0 tables/fvar/Fvar#, InstanceRecordrust-analyzer cargo write-fonts 0.39.0 tables/fvar/instance_record/InstanceRecord#},
235 namerust-analyzer cargo write-fonts 0.39.0 tables/name/::{Namerust-analyzer cargo write-fonts 0.39.0 tables/name/Name#, NameRecordrust-analyzer cargo write-fonts 0.39.0 tables/name/NameRecord#},
236 os2rust-analyzer cargo write-fonts 0.39.0 tables/os2/::Os2rust-analyzer cargo write-fonts 0.39.0 tables/os2/Os2#,
237 statrust-analyzer cargo write-fonts 0.39.0 tables/stat/::Statrust-analyzer cargo write-fonts 0.39.0 tables/stat/Stat#,
238 },
239 typesrust-analyzer cargo font-types 0.9.0 crate/::Fixedrust-analyzer cargo font-types 0.9.0 fixed/Fixed#,
240 },
241 };
242 use monkeypatchingrust-analyzer cargo google-fonts-axisregistry 0.4.15 monkeypatching/::{AxisValueNameIdrust-analyzer cargo google-fonts-axisregistry 0.4.15 monkeypatching/AxisValueNameId#, SetAxisValueNameIdrust-analyzer cargo google-fonts-axisregistry 0.4.15 monkeypatching/SetAxisValueNameId#};
243 use nametablerust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/::{
244 add_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/add_name()., best_familynamerust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/best_familyname()., best_subfamilynamerust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/best_subfamilyname()., find_or_add_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/find_or_add_name()., rewrite_or_insertrust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/rewrite_or_insert().,
245 };
246 use statrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/::{AxisLocationrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisLocation#, AxisRecordrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisRecord#, AxisValuerust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisValue#, StatBuilderrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/StatBuilder#};
247 use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::{cmprust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/::Reverserust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Reverse#, collectionsrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/::HashMaprust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/HashMap#};
248
249 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:)]
250 pub enum RenameAggressivenessrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/RenameAggressiveness# {
251 #[defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/default:]
252 Aggressiverust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/RenameAggressiveness#Aggressive#,
253 Conservativerust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/RenameAggressiveness#Conservative#,
254 }
255
256 pub fn build_name_tablerust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/build_name_table().(
257 font: FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#,
258 family_name: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&str>,
259 style_name: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&str>,
260 siblings: &[FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#],
261 aggressive: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<RenameAggressivenessrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/RenameAggressiveness#>,
262 ) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u8>, Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<dyn stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std error/::Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error#>> {
263 let mut new_font = FontBuilderrust-analyzer cargo write-fonts 0.39.0 font_builder/FontBuilder#::newrust-analyzer cargo write-fonts 0.39.0 font_builder/impl#[`FontBuilder<'a>`]new().();
264 let family_name = family_name
265 .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]map().(|x| x.to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().())
266 .unwrap_or_elserust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or_else().(|| best_familynamerust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/best_familyname().(&font).unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or().("Unknown".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().()));
267 let style_name = style_name
268 .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]map().(|x| x.to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().())
269 .unwrap_or_elserust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or_else().(|| best_subfamilynamerust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/best_subfamilyname().(&font).unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or().("Regular".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().()));
270
271 let mut new_name = if font.table_datarust-analyzer cargo read-fonts 0.30.1 impl#[`FontRef<'a>`]table_data().(Tagrust-analyzer cargo font-types 0.9.0 tag/Tag#::newrust-analyzer cargo font-types 0.9.0 tag/impl#[Tag]new().(b"fvar")).is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().() {
272 build_vf_name_tablerust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/build_vf_name_table().(&mut new_font, &font, &family_name, siblings, aggressive)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().
273 } else {
274 build_static_name_table_v1rust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/build_static_name_table_v1().(&mut new_font, &font, &family_name, &style_name, aggressive)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().
275 };
276
277 let mut styles: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<_> = GF_STATIC_STYLESrust-analyzer cargo google-fonts-axisregistry 0.4.15 GF_STATIC_STYLES..iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().();
278 styles.sort_by_keyrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/impl#[`[T]`]sort_by_key().(|(name, _weight)| Reverserust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Reverse#(name.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]len().()));
279 for (name, weight) in styles.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().() {
280 if style_name.containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]contains().(name) {
281 let mut new_os2: Os2rust-analyzer cargo write-fonts 0.39.0 tables/os2/Os2# = font.os2rust-analyzer cargo read-fonts 0.30.1 table_provider/TableProvider#os2().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch()..to_owned_tablerust-analyzer cargo write-fonts 0.39.0 from_obj/impl#[T][`ToOwnedTable<U>`]to_owned_table().();
282 new_os2.us_weight_classrust-analyzer cargo write-fonts 0.39.0 tables/os2/Os2#us_weight_class. = *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().weight;
283 new_font.add_tablerust-analyzer cargo write-fonts 0.39.0 font_builder/impl#[`FontBuilder<'a>`]add_table().(&new_os2)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
284 break;
285 }
286 }
287 // Set RIBBI bits
288 new_name.name_recordrust-analyzer cargo write-fonts 0.39.0 tables/name/Name#name_record..sortrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/impl#[`[T]`]sort().();
289 new_font.add_tablerust-analyzer cargo write-fonts 0.39.0 font_builder/impl#[`FontBuilder<'a>`]add_table().(&new_name)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
290 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(new_font.copy_missing_tablesrust-analyzer cargo write-fonts 0.39.0 font_builder/impl#[`FontBuilder<'a>`]copy_missing_tables().(font).buildrust-analyzer cargo write-fonts 0.39.0 font_builder/impl#[`FontBuilder<'a>`]build().())
291 }
292
293 fn fvar_instance_collisionsrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/fvar_instance_collisions().(font: &FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#, siblings: &[FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#]) -> bool {
294 let fonts = siblings.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().chainrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#chain().(stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/::oncerust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/sources/once/once().(font));
295 let is_italic = fonts
296 .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|f| {
297 f.postrust-analyzer cargo read-fonts 0.30.1 table_provider/TableProvider#post().()
298 .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map().(|post| post.italic_anglerust-analyzer cargo read-fonts 0.30.1 tables/post/impl#[`TableRef<'a, PostMarker>`]italic_angle().().absrust-analyzer cargo font-types 0.9.0 fixed/impl#[Fixed]abs().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().Fixedrust-analyzer cargo font-types 0.9.0 fixed/Fixed#::from_f64rust-analyzer cargo font-types 0.9.0 fixed/impl#[Fixed]from_f64().(0.0))
299 .unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap_or().(false)
300 })
301 .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<_>>();
302 is_italic.lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne().is_italic.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<HashSetrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/HashSet#<_>>().lenrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]len().()
303 }
304
305 fn build_vf_name_tablerust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/build_vf_name_table().(
306 newfont: &mut FontBuilderrust-analyzer cargo write-fonts 0.39.0 font_builder/FontBuilder#,
307 font: &FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#,
308 family_name: &str,
309 siblings: &[FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#],
310 aggressive: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<RenameAggressivenessrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/RenameAggressiveness#>,
311 ) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Namerust-analyzer cargo write-fonts 0.39.0 tables/name/Name#, Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<dyn stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std error/::Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error#>> {
312 let style_name = vf_style_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/vf_style_name().(font, family_name)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
313 let mut new_name: Namerust-analyzer cargo write-fonts 0.39.0 tables/name/Name# = (if fvar_instance_collisionsrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/fvar_instance_collisions().(font, siblings) {
314 build_static_name_table_v1rust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/build_static_name_table_v1().(newfont, font, family_name, &style_name, aggressive)
315 } else {
316 build_static_name_tablerust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/build_static_name_table().(newfont, font, family_name, style_name, aggressive)
317 })?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
318 // println!("Records: {:#?}", new_name.name_record);
319 build_variations_ps_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/build_variations_ps_name().(&mut new_name, font, Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(family_name));
320
321 // Ensure table records are sorted
322 new_name.name_recordrust-analyzer cargo write-fonts 0.39.0 tables/name/Name#name_record..sortrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/impl#[`[T]`]sort().();
323 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(new_name)
324 }
325
326 fn build_variations_ps_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/build_variations_ps_name().(newname: &mut Namerust-analyzer cargo write-fonts 0.39.0 tables/name/Name#, font: &FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#, family_name: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&str>) {
327 let fallback = best_familynamerust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/best_familyname().(font);
328 let family_name = family_name.orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]or().(fallback.as_derefrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_deref().()).unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or().("New Font");
329 let subfamily_name = best_subfamilynamerust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/best_subfamilyname().(font).unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or().("Regular".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().());
330 let font_axes = font_axesrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/font_axes().(font).unwrap_or_defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap_or_default().();
331 let registry = AxisRegistryrust-analyzer cargo google-fonts-axisregistry 0.4.15 AxisRegistry#::newrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]new().();
332 let font_styles = registry.name_table_fallbacksrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]name_table_fallbacks().(family_name, &subfamily_name, &font_axes);
333 let mut var_ps = family_name.replacerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str]replace().(" ", "");
334 for (_, fallback) in font_styles {
335 let fallback_name = fallback.name();
336 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().var_ps.containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]contains().(fallback_name) {
337 var_ps.push_strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]push_str().(fallback_name);
338 }
339 }
340 rewrite_or_insertrust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/rewrite_or_insert().(
341 &mut newname.name_recordrust-analyzer cargo write-fonts 0.39.0 tables/name/Name#name_record.,
342 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::VARIATIONS_POSTSCRIPT_NAME_PREFIXrust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]VARIATIONS_POSTSCRIPT_NAME_PREFIX.,
343 &var_ps,
344 );
345 }
346
347 fn build_static_name_table_v1rust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/build_static_name_table_v1().(
348 newfont: &mut FontBuilderrust-analyzer cargo write-fonts 0.39.0 font_builder/FontBuilder#,
349 font: &FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#,
350 family_name: &str,
351 style_name: &str,
352 aggressive: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<RenameAggressivenessrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/RenameAggressiveness#>,
353 ) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Namerust-analyzer cargo write-fonts 0.39.0 tables/name/Name#, Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<dyn stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std error/::Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error#>> {
354 let (v1_tokens, non_weight) = style_name
355 .split_whitespacerust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]split_whitespace().()
356 .partitionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#partition().::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<_>, _>(|token| GF_STATIC_STYLESrust-analyzer cargo google-fonts-axisregistry 0.4.15 GF_STATIC_STYLES..iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().anyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/impl#[`Iter<'a, T>`][Iterator]any().(|(name, _)| name rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq().token));
357 let family_tokens = family_name.split_whitespacerust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]split_whitespace().();
358 let mut new_family_name = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![];
359 for token in family_tokens {
360 if non_weight.containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]contains().(&token) || new_family_name.containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]contains().(&token) {
361 continue;
362 }
363 new_family_name.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(token);
364 }
365 new_family_name.extendrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Extend<T>`]extend().(non_weight);
366 let family_name = new_family_name.joinrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/impl#[`[T]`]join().(" ");
367 let mut style_name = v1_tokens
368 .joinrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/impl#[`[T]`]join().(" ")
369 .replacerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str]replace().("Regular Italic", "Italic")
370 .trimrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]trim().()
371 .to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().();
372 if style_name.is_emptyrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]is_empty().() {
373 style_name = "Regular".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().();
374 }
375 build_static_name_tablerust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/build_static_name_table().(newfont, font, &family_name, style_name, aggressive)
376 }
377
378 fn build_static_name_tablerust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/build_static_name_table().(
379 newfont: &mut FontBuilderrust-analyzer cargo write-fonts 0.39.0 font_builder/FontBuilder#,
380 font: &FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#,
381 family_name: &str,
382 style_name: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#,
383 aggressive: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<RenameAggressivenessrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/RenameAggressiveness#>,
384 ) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Namerust-analyzer cargo write-fonts 0.39.0 tables/name/Name#, Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<dyn stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std error/::Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error#>> {
385 let mut name: Namerust-analyzer cargo write-fonts 0.39.0 tables/name/Name# = font.namerust-analyzer cargo read-fonts 0.30.1 table_provider/TableProvider#name().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch()..to_owned_tablerust-analyzer cargo write-fonts 0.39.0 from_obj/impl#[T][`ToOwnedTable<U>`]to_owned_table().();
386 let mut records = name.name_recordrust-analyzer cargo write-fonts 0.39.0 tables/name/Name#name_record..into_iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][IntoIterator]into_iter().().collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<NameRecordrust-analyzer cargo write-fonts 0.39.0 tables/name/NameRecord#>>();
387 records.retainrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]retain().(|record| record.platform_idrust-analyzer cargo write-fonts 0.39.0 tables/name/NameRecord#platform_id. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]ne().1);
388 let existing_name = best_familynamerust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/best_familyname().(font).unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or().("New Font".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().());
389 let mut removed_names: HashMaprust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/HashMap#<StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#, Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#> = HashMaprust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/HashMap#::newrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V>`]new().();
390 let full_name = family_name.to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().() rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`Add<&str>`]add().+rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`Add<&str>`]add(). rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`Add<&str>`]add()." " rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().&style_name;
391 let ps_name = (family_name.to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().() rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`Add<&str>`]add().+rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`Add<&str>`]add(). rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`Add<&str>`]add()."-" rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().&style_name).replacerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str]replace().(" ", "");
392 let removeable_name_ids =
393 if ["Italic", "Bold Italic", "Bold", "Regular"].containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]contains().(&style_name.as_strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]as_str().()) {
394 rewrite_or_insertrust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/rewrite_or_insert().(&mut records, StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FAMILY_NAME., family_name);
395 rewrite_or_insertrust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/rewrite_or_insert().(&mut records, StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]SUBFAMILY_NAME., &style_name);
396 rewrite_or_insertrust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/rewrite_or_insert().(&mut records, StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FULL_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FULL_NAME., &full_name);
397 rewrite_or_insertrust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/rewrite_or_insert().(&mut records, StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::POSTSCRIPT_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]POSTSCRIPT_NAME., &ps_name);
398 vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
399 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_FAMILY_NAME.,
400 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_SUBFAMILY_NAME.,
401 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::newrust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]new().(21),
402 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::newrust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]new().(22),
403 ]
404 } else {
405 let style_tokens = style_name.split_whitespacerust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]split_whitespace().().collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<_>>();
406 let mut new_family_name_tokens = family_name.split_whitespacerust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]split_whitespace().().collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<_>>();
407 let is_italic = style_tokens.containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]contains().(&"Italic");
408 let additional_tokens = (style_tokens.into_iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][IntoIterator]into_iter().().filterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#filter().(|token| {
409 !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().token rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq()."Regular"
410 || *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().token rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq()."Italic"
411 || new_family_name_tokens.containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]contains().(token))
412 }))
413 .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<_>>();
414 new_family_name_tokens.extendrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Extend<T>`]extend().(additional_tokens);
415 let new_family_name = new_family_name_tokens.joinrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/impl#[`[T]`]join().(" ");
416 let new_style_name = if is_italic { "Italic" } else { "Regular" };
417
418 rewrite_or_insertrust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/rewrite_or_insert().(&mut records, StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FAMILY_NAME., &new_family_name);
419 rewrite_or_insertrust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/rewrite_or_insert().(&mut records, StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]SUBFAMILY_NAME., new_style_name);
420 rewrite_or_insertrust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/rewrite_or_insert().(&mut records, StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FULL_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FULL_NAME., &full_name);
421 rewrite_or_insertrust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/rewrite_or_insert().(&mut records, StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::POSTSCRIPT_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]POSTSCRIPT_NAME., &ps_name);
422 rewrite_or_insertrust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/rewrite_or_insert().(&mut records, StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_FAMILY_NAME., family_name);
423 rewrite_or_insertrust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/rewrite_or_insert().(
424 &mut records,
425 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_SUBFAMILY_NAME.,
426 &style_name,
427 );
428
429 vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::newrust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]new().(21), StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::newrust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]new().(22)]
430 };
431
432 let mut to_delete = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![];
433 for name_id in removeable_name_ids.into_iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][IntoIterator]into_iter().() {
434 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(existing) = records.iter_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter_mut().().positionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/impl#[`IterMut<'a, T>`][Iterator]position().(|r| {
435 r.name_idrust-analyzer cargo write-fonts 0.39.0 tables/name/NameRecord#name_id. rust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId][`PartialEq<Self>`]eq().==rust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId][`PartialEq<Self>`]eq(). rust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId][`PartialEq<Self>`]eq().name_id
436 && r.platform_idrust-analyzer cargo write-fonts 0.39.0 tables/name/NameRecord#platform_id. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().3
437 && r.encoding_idrust-analyzer cargo write-fonts 0.39.0 tables/name/NameRecord#encoding_id. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().1
438 && r.language_idrust-analyzer cargo write-fonts 0.39.0 tables/name/NameRecord#language_id. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().0x409
439 }) {
440 removed_names.insertrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]insert().(name_id, records[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().existing]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index()..stringrust-analyzer cargo write-fonts 0.39.0 tables/name/NameRecord#string..to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().());
441 to_delete.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(existing);
442 }
443 }
444 for i in to_delete.into_iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][IntoIterator]into_iter().().revrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#rev().() {
445 records.removerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]remove().(i);
446 }
447
448 // If STAT table was using any removed names, add then back with a new ID
449 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().removed_names.is_emptyrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]is_empty().() && font.table_datarust-analyzer cargo read-fonts 0.30.1 impl#[`FontRef<'a>`]table_data().(Tagrust-analyzer cargo font-types 0.9.0 tag/Tag#::from_be_bytesrust-analyzer cargo font-types 0.9.0 tag/impl#[Tag]from_be_bytes().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().b"STAT")).is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().() {
450 let mut stat: Statrust-analyzer cargo write-fonts 0.39.0 tables/stat/Stat# = font.statrust-analyzer cargo read-fonts 0.30.1 table_provider/TableProvider#stat().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch()..to_owned_tablerust-analyzer cargo write-fonts 0.39.0 from_obj/impl#[T][`ToOwnedTable<U>`]to_owned_table().();
451 for axis in stat.design_axesrust-analyzer cargo write-fonts 0.39.0 tables/stat/Stat#design_axes..iter_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter_mut().() {
452 let id = axis.axis_name_idrust-analyzer cargo write-fonts 0.39.0 tables/stat/AxisRecord#axis_name_id.;
453 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(old_name) = removed_names.getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&id) {
454 axis.axis_name_idrust-analyzer cargo write-fonts 0.39.0 tables/stat/AxisRecord#axis_name_id. = find_or_add_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/find_or_add_name().(&mut records, old_name);
455 }
456 }
457 // Also do the axis value array
458 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(axis_values) = stat.offset_to_axis_valuesrust-analyzer cargo write-fonts 0.39.0 tables/stat/Stat#offset_to_axis_values..as_deref_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_deref_mut().() {
459 for axis_value in axis_values.iter_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter_mut().() {
460 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(name_id) = axis_value.value_name_idrust-analyzer cargo google-fonts-axisregistry 0.4.15 monkeypatching/impl#[WriteAxisValue][AxisValueNameId]value_name_id().() {
461 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(old_name) = removed_names.getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&name_id) {
462 axis_value.set_value_name_idrust-analyzer cargo google-fonts-axisregistry 0.4.15 monkeypatching/impl#[WriteAxisValue][SetAxisValueNameId]set_value_name_id().(find_or_add_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/find_or_add_name().(&mut records, old_name));
463 }
464 }
465 }
466 }
467 newfont.add_tablerust-analyzer cargo write-fonts 0.39.0 font_builder/impl#[`FontBuilder<'a>`]add_table().(&stat)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
468 }
469
470 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(existing) = records.iter_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter_mut().().findrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/impl#[`IterMut<'a, T>`][Iterator]find().(|r| {
471 r.name_idrust-analyzer cargo write-fonts 0.39.0 tables/name/NameRecord#name_id. rust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId][`PartialEq<Self>`]eq().==rust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId][`PartialEq<Self>`]eq(). rust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId][`PartialEq<Self>`]eq().StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::UNIQUE_IDrust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]UNIQUE_ID.
472 && r.platform_idrust-analyzer cargo write-fonts 0.39.0 tables/name/NameRecord#platform_id. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().3
473 && r.encoding_idrust-analyzer cargo write-fonts 0.39.0 tables/name/NameRecord#encoding_id. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().1
474 && r.language_idrust-analyzer cargo write-fonts 0.39.0 tables/name/NameRecord#language_id. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().0x409
475 }) {
476 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_unique) = new_unique_idrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/new_unique_id().(font, &full_name, &ps_name, &existing.stringrust-analyzer cargo write-fonts 0.39.0 tables/name/NameRecord#string.) {
477 *rust-analyzer cargo write-fonts 0.39.0 offsets/impl#[`OffsetMarker<T, N>`][DerefMut]deref_mut().existing.stringrust-analyzer cargo write-fonts 0.39.0 tables/name/NameRecord#string. = new_unique;
478 }
479 }
480 if aggressive.unwrap_or_defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or_default().() rust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/impl#[RenameAggressiveness][`PartialEq<Self>`]eq().==rust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/impl#[RenameAggressiveness][`PartialEq<Self>`]eq(). rust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/impl#[RenameAggressiveness][`PartialEq<Self>`]eq().RenameAggressivenessrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/RenameAggressiveness#::Aggressiverust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/RenameAggressiveness#Aggressive# {
481 for record in records.iter_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter_mut().() {
482 if PROTECTED_IDSrust-analyzer cargo google-fonts-axisregistry 0.4.15 PROTECTED_IDS..containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]contains().(&record.name_idrust-analyzer cargo write-fonts 0.39.0 tables/name/NameRecord#name_id.)
483 || !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().record.stringrust-analyzer cargo write-fonts 0.39.0 tables/name/NameRecord#string..containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]contains().(&existing_name)
484 {
485 continue;
486 }
487 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().record.stringrust-analyzer cargo write-fonts 0.39.0 tables/name/NameRecord#string..containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]contains().(' ') {
488 *rust-analyzer cargo write-fonts 0.39.0 offsets/impl#[`OffsetMarker<T, N>`][DerefMut]deref_mut().record.stringrust-analyzer cargo write-fonts 0.39.0 tables/name/NameRecord#string. = record
489 .stringrust-analyzer cargo write-fonts 0.39.0 tables/name/NameRecord#string.
490 .replacerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str]replace().(&existing_name, family_name)
491 .replacerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str]replace().(" ", "");
492 } else {
493 *rust-analyzer cargo write-fonts 0.39.0 offsets/impl#[`OffsetMarker<T, N>`][DerefMut]deref_mut().record.stringrust-analyzer cargo write-fonts 0.39.0 tables/name/NameRecord#string. = record.stringrust-analyzer cargo write-fonts 0.39.0 tables/name/NameRecord#string..replacerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str]replace().(&existing_name, family_name);
494 }
495 }
496 }
497 name.name_recordrust-analyzer cargo write-fonts 0.39.0 tables/name/Name#name_record. = records;
498 name.name_recordrust-analyzer cargo write-fonts 0.39.0 tables/name/Name#name_record..sortrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/impl#[`[T]`]sort().();
499 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(name)
500 }
501
502 fn new_unique_idrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/new_unique_id().(
503 font: &FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#<'_>,
504 full_name: &str,
505 ps_name: &str,
506 existing: &str,
507 ) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#> {
508 let new = existing.to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().();
509 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(existing_full_name) = font
510 .localized_stringsrust-analyzer cargo skrifa 0.32.0 provider/impl#[`FontRef<'a>`][`MetadataProvider<'a>`]localized_strings().(StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FULL_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FULL_NAME.)
511 .english_or_firstrust-analyzer cargo skrifa 0.32.0 string/impl#[`LocalizedStrings<'a>`]english_or_first().()
512 {
513 let existing_full_name = existing_full_name.charsrust-analyzer cargo skrifa 0.32.0 string/impl#[`LocalizedString<'a>`]chars().().collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>();
514 if new.containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]contains().(&existing_full_name) {
515 return Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new.replacerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str]replace().(&existing_full_name, full_name));
516 }
517 }
518 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(existing_ps_name) = font
519 .localized_stringsrust-analyzer cargo skrifa 0.32.0 provider/impl#[`FontRef<'a>`][`MetadataProvider<'a>`]localized_strings().(StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::POSTSCRIPT_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]POSTSCRIPT_NAME.)
520 .english_or_firstrust-analyzer cargo skrifa 0.32.0 string/impl#[`LocalizedStrings<'a>`]english_or_first().()
521 {
522 let existing_ps_name = existing_ps_name.charsrust-analyzer cargo skrifa 0.32.0 string/impl#[`LocalizedString<'a>`]chars().().collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>();
523 if new.containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]contains().(&existing_ps_name) {
524 return Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new.replacerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str]replace().(&existing_ps_name, ps_name));
525 }
526 }
527 Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#
528 }
529
530 fn font_axesrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/font_axes().(font: &FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<FontAxisrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#>, ReadErrorrust-analyzer cargo read-fonts 0.30.1 read/ReadError#> {
531 let fvar = font.fvarrust-analyzer cargo read-fonts 0.30.1 table_provider/TableProvider#fvar().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().();
532 let mut axes = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![];
533 for axis in fvar.axesrust-analyzer cargo read-fonts 0.30.1 tables/fvar/impl#[`TableRef<'a, FvarMarker>`]axes().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch(). {
534 let tag = axis.axis_tagrust-analyzer cargo read-fonts 0.30.1 tables/fvar/impl#[VariationAxisRecord]axis_tag().().to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().();
535 let min = axis.min_valuerust-analyzer cargo read-fonts 0.30.1 tables/fvar/impl#[VariationAxisRecord]min_value().().to_f32rust-analyzer cargo font-types 0.9.0 fixed/impl#[Fixed]to_f32().();
536 let max = axis.max_valuerust-analyzer cargo read-fonts 0.30.1 tables/fvar/impl#[VariationAxisRecord]max_value().().to_f32rust-analyzer cargo font-types 0.9.0 fixed/impl#[Fixed]to_f32().();
537 let default = axis.default_valuerust-analyzer cargo read-fonts 0.30.1 tables/fvar/impl#[VariationAxisRecord]default_value().().to_f32rust-analyzer cargo font-types 0.9.0 fixed/impl#[Fixed]to_f32().();
538 axes.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(FontAxisrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis# {
539 tagrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#tag.,
540 minrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#min.,
541 maxrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#max.,
542 defaultrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#default.,
543 });
544 }
545 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(axes)
546 }
547
548 fn vf_style_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/vf_style_name().(font: &FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#, family_name: &str) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, ReadErrorrust-analyzer cargo read-fonts 0.30.1 read/ReadError#> {
549 let axisregistry = AxisRegistryrust-analyzer cargo google-fonts-axisregistry 0.4.15 AxisRegistry#::newrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]new().();
550 let axes: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<_> = font_axesrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/font_axes().(font)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
551 let fvar_dflts = axisregistry.name_particlesrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]name_particles().(&axes);
552 let mut relevant_particles: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#> = axisregistry
553 .axis_orderrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]axis_order().()
554 .iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().()
555 .flat_maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#flat_map().(|tag| fvar_dflts.getrust-analyzer cargo indexmap 2.9.0 map/impl#[`IndexMap<K, V, S>`]get().(tag))
556 .filterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#filter().(|particle| !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().particle.elidedrust-analyzer cargo google-fonts-axisregistry 0.4.15 NameParticle#elided.)
557 .flat_maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#flat_map().(|particle| particle.namerust-analyzer cargo google-fonts-axisregistry 0.4.15 NameParticle#name..clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Clone]clone().())
558 .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<_>>();
559 let family_name_tokens = family_name.split_whitespacerust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]split_whitespace().().collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<HashSetrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/HashSet#<_>>();
560 let subfamily_name = best_subfamilynamerust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/best_subfamilyname().(font);
561 let font_styles = axisregistry
562 .name_table_fallbacksrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]name_table_fallbacks().(
563 family_name,
564 subfamily_name.as_derefrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_deref().().unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or().("Regular"),
565 &axes,
566 )
567 .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|(_tag, proto)| proto.name())
568 .filter(|name| !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().family_name_tokens.containsrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]contains().(name))
569 .map(|name| name.to_string())
570 .filter(|name| !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().relevant_particles.containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]contains().(name))
571 .collect::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<_>>();
572 relevant_particles.extendrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Extend<T>`]extend().(font_styles);
573 let name = relevant_particles
574 .joinrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/impl#[`[T]`]join().(" ")
575 .replacerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str]replace().("Regular Italic", "Italic");
576 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(name)
577 }
578
579 /// Return a font with an fvar table which conforms to the Google Fonts instance spec:
580 /// https://github.com/googlefonts/gf-docs/tree/main/Spec#fvar-instances
581 pub fn build_fvar_instancesrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/build_fvar_instances().(
582 font: FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#,
583 axis_dflts: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<HashMaprust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/HashMap#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, f32>>,
584 ) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u8>, Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<dyn stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std error/::Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error#>> {
585 let axis_registry = AxisRegistryrust-analyzer cargo google-fonts-axisregistry 0.4.15 AxisRegistry#::newrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]new().();
586 let mut new_font = FontBuilderrust-analyzer cargo write-fonts 0.39.0 font_builder/FontBuilder#::newrust-analyzer cargo write-fonts 0.39.0 font_builder/impl#[`FontBuilder<'a>`]new().();
587 let mut fvar: Fvarrust-analyzer cargo write-fonts 0.39.0 tables/fvar/Fvar# = font.fvarrust-analyzer cargo read-fonts 0.30.1 table_provider/TableProvider#fvar().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().().to_owned_tablerust-analyzer cargo write-fonts 0.39.0 from_obj/impl#[T][`ToOwnedTable<U>`]to_owned_table().();
588 let mut name_table: Namerust-analyzer cargo write-fonts 0.39.0 tables/name/Name# = font.namerust-analyzer cargo read-fonts 0.30.1 table_provider/TableProvider#name().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().().to_owned_tablerust-analyzer cargo write-fonts 0.39.0 from_obj/impl#[T][`ToOwnedTable<U>`]to_owned_table().();
589 let family_name = best_familynamerust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/best_familyname().(&font).unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or().("New Font".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().());
590 let style_name = best_subfamilynamerust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/best_subfamilyname().(&font).unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or().("Regular".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().());
591 // Protect name IDs which are shared with the STAT table
592 let mut stat_name_ids = HashSetrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/HashSet#::newrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T>`]new().();
593 if let Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(stat) = font.statrust-analyzer cargo read-fonts 0.30.1 table_provider/TableProvider#stat().() {
594 for axis in stat.design_axesrust-analyzer cargo read-fonts 0.30.1 tables/stat/impl#[`TableRef<'a, StatMarker>`]design_axes().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch()..iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().() {
595 stat_name_ids.insertrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]insert().(axis.axis_name_idrust-analyzer cargo read-fonts 0.30.1 tables/stat/impl#[AxisRecord]axis_name_id().());
596 }
597 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(axis_values_offset) = stat.offset_to_axis_valuesrust-analyzer cargo read-fonts 0.30.1 tables/stat/impl#[`TableRef<'a, StatMarker>`]offset_to_axis_values().().transposerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<Result<T, E>>`]transpose().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch(). {
598 for axis_value in axis_values_offset.axis_valuesrust-analyzer cargo read-fonts 0.30.1 tables/stat/impl#[`TableRef<'a, AxisValueArrayMarker>`]axis_values().().iterrust-analyzer cargo read-fonts 0.30.1 offset_array/impl#[`ArrayOfOffsets<'a, T, O>`]iter().().flattenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#flatten().() {
599 stat_name_ids.insertrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]insert().(axis_value.value_name_idrust-analyzer cargo read-fonts 0.30.1 tables/stat/impl#[`AxisValue<'a>`]value_name_id().());
600 }
601 }
602 }
603
604 // Remove old fvar subfamily and ps name records
605 for instance in fvar.axis_instance_arraysrust-analyzer cargo write-fonts 0.39.0 tables/fvar/Fvar#axis_instance_arrays..instancesrust-analyzer cargo write-fonts 0.39.0 tables/fvar/AxisInstanceArrays#instances..iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().() {
606 if instance.subfamily_name_idrust-analyzer cargo write-fonts 0.39.0 tables/fvar/instance_record/InstanceRecord#subfamily_name_id. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]SUBFAMILY_NAME.
607 && instance.subfamily_name_idrust-analyzer cargo write-fonts 0.39.0 tables/fvar/instance_record/InstanceRecord#subfamily_name_id. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_SUBFAMILY_NAME.
608 && !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().stat_name_ids.containsrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]contains().(&instance.subfamily_name_idrust-analyzer cargo write-fonts 0.39.0 tables/fvar/instance_record/InstanceRecord#subfamily_name_id.)
609 {
610 name_table
611 .name_recordrust-analyzer cargo write-fonts 0.39.0 tables/name/Name#name_record.
612 .retainrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]retain().(|record| record.name_idrust-analyzer cargo write-fonts 0.39.0 tables/name/NameRecord#name_id. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().instance.subfamily_name_idrust-analyzer cargo write-fonts 0.39.0 tables/fvar/instance_record/InstanceRecord#subfamily_name_id.);
613 }
614 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(psname) = instance.post_script_name_idrust-analyzer cargo write-fonts 0.39.0 tables/fvar/instance_record/InstanceRecord#post_script_name_id. {
615 if psname rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::POSTSCRIPT_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]POSTSCRIPT_NAME. {
616 name_table
617 .name_recordrust-analyzer cargo write-fonts 0.39.0 tables/name/Name#name_record.
618 .retainrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]retain().(|record| record.name_idrust-analyzer cargo write-fonts 0.39.0 tables/name/NameRecord#name_id. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().psname);
619 }
620 }
621 }
622
623 let axes = font_axesrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/font_axes().(&font)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
624 let fvar_defaults = axis_registry.name_particlesrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]name_particles().(&axes);
625
626 let axis_dflts = axis_dflts.unwrap_or_elserust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or_else().(|| {
627 fvar_defaults
628 .iterrust-analyzer cargo indexmap 2.9.0 map/impl#[`IndexMap<K, V, S>`]iter().()
629 .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|(tag, particle)| (tag.to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(), particle.valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 NameParticle#value.))
630 .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().()
631 });
632
633 let is_italic = style_name.containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]contains().("Italic");
634 let is_roman_and_italic =
635 fvar_defaults.contains_keyrust-analyzer cargo indexmap 2.9.0 map/impl#[`IndexMap<K, V, S>`]contains_key().("ital") || fvar_defaults.contains_keyrust-analyzer cargo indexmap 2.9.0 map/impl#[`IndexMap<K, V, S>`]contains_key().("slnt");
636
637 let mut fallbacks: HashMaprust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/HashMap#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<FallbackProto>> =
638 axis_registry.fallbacksrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]fallbacks().(&axes).collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().();
639 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().fvar_defaults.contains_keyrust-analyzer cargo indexmap 2.9.0 map/impl#[`IndexMap<K, V, S>`]contains_key().("wght") {
640 fallbacks.insert(
641 "wght".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(),
642 axis_registry
643 .getrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]get().("wght")
644 .unwrap()
645 .fallback
646 .iter()
647 .filter(|f| f.value rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#eq().Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(400.0))
648 .take(1)
649 .cloned()
650 .collect(),
651 );
652 }
653 let wght_fallbacks = fallbacks.get("wght").ok_or("No wght fallbacks")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/try_trait/Try#branch().;
654 let min_ital: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<f32> = axes
655 .iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().()
656 .filterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#filter().(|axis| axis.tagrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#tag. rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`PartialEq<&str>`]eq().==rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`PartialEq<&str>`]eq(). rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`PartialEq<&str>`]eq()."ital")
657 .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|axis| axis.minrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#min.)
658 .nextrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/adapters/map/impl#[`Map<I, F>`][Iterator]next().();
659 let min_slnt: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<f32> = axes
660 .iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().()
661 .filterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#filter().(|axis| axis.tagrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#tag. rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`PartialEq<&str>`]eq().==rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`PartialEq<&str>`]eq(). rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`PartialEq<&str>`]eq()."ital")
662 .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|axis| axis.minrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#min.)
663 .nextrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/adapters/map/impl#[`Map<I, F>`][Iterator]next().();
664
665 let mut instances = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![];
666 let do_italic = if is_roman_and_italic {
667 vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![false, true]
668 } else if is_italic {
669 vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![true]
670 } else {
671 vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![false]
672 };
673 for italic in do_italic.into_iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][IntoIterator]into_iter().() {
674 for fallback in wght_fallbacks.iter() {
675 let mut name = fallback.name.as_ref().unwrap().to_string();
676 if italic {
677 name rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/AddAssign#add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/AddAssign#add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/AddAssign#add_assign()." Italic";
678 }
679 name = name.replace("Regular Italic", "Italic");
680 let mut coordinates = axis_dflts.clonerust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`][Clone]clone().();
681 if fvar_defaults.contains_keyrust-analyzer cargo indexmap 2.9.0 map/impl#[`IndexMap<K, V, S>`]contains_key().("wght") {
682 coordinates.insertrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]insert().("wght".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(), fallback.value.unwrap());
683 }
684 if italic {
685 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(min) = min_ital {
686 coordinates.insertrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]insert().("ital".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(), min);
687 } else if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(min) = min_slnt {
688 coordinates.insertrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]insert().("slnt".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(), min);
689 }
690 }
691 let subfamily_name_id = add_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/add_name().(&mut name_table.name_recordrust-analyzer cargo write-fonts 0.39.0 tables/name/Name#name_record., &name);
692 let post_script_name_id = add_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/add_name().(
693 &mut name_table.name_recordrust-analyzer cargo write-fonts 0.39.0 tables/name/Name#name_record.,
694 &formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("{}-{}", family_name, name).replacerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str]replace().(" ", ""),
695 );
696 let coordinates = axes
697 .iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().()
698 .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|axis| coordinates.getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&axis.tagrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#tag.).clonedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<&T>`]cloned().().unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or().(axis.defaultrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#default.))
699 .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|val| Fixedrust-analyzer cargo font-types 0.9.0 fixed/Fixed#::from_f64rust-analyzer cargo font-types 0.9.0 fixed/impl#[Fixed]from_f64().(val as f64))
700 .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().();
701 instances.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(InstanceRecordrust-analyzer cargo write-fonts 0.39.0 tables/fvar/instance_record/InstanceRecord# {
702 subfamily_name_idrust-analyzer cargo write-fonts 0.39.0 tables/fvar/instance_record/InstanceRecord#subfamily_name_id.,
703 flagsrust-analyzer cargo write-fonts 0.39.0 tables/fvar/instance_record/InstanceRecord#flags.: 0,
704 coordinatesrust-analyzer cargo write-fonts 0.39.0 tables/fvar/instance_record/InstanceRecord#coordinates.,
705 post_script_name_idrust-analyzer cargo write-fonts 0.39.0 tables/fvar/instance_record/InstanceRecord#post_script_name_id.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(post_script_name_id),
706 })
707 }
708 }
709
710 fvar.axis_instance_arraysrust-analyzer cargo write-fonts 0.39.0 tables/fvar/Fvar#axis_instance_arrays..instancesrust-analyzer cargo write-fonts 0.39.0 tables/fvar/AxisInstanceArrays#instances. = instances;
711
712 new_font.add_tablerust-analyzer cargo write-fonts 0.39.0 font_builder/impl#[`FontBuilder<'a>`]add_table().(&fvar)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
713 name_table.name_recordrust-analyzer cargo write-fonts 0.39.0 tables/name/Name#name_record..sortrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/impl#[`[T]`]sort().();
714 new_font.add_tablerust-analyzer cargo write-fonts 0.39.0 font_builder/impl#[`FontBuilder<'a>`]add_table().(&name_table)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
715 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(new_font.copy_missing_tablesrust-analyzer cargo write-fonts 0.39.0 font_builder/impl#[`FontBuilder<'a>`]copy_missing_tables().(font).buildrust-analyzer cargo write-fonts 0.39.0 font_builder/impl#[`FontBuilder<'a>`]build().())
716 }
717
718 // All right, let's do it
719 pub fn build_statrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/build_stat().(
720 font: FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#,
721 siblings: &[FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#],
722 ) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u8>, Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<dyn stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std error/::Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error#>> {
723 let mut new_font = FontBuilderrust-analyzer cargo write-fonts 0.39.0 font_builder/FontBuilder#::newrust-analyzer cargo write-fonts 0.39.0 font_builder/impl#[`FontBuilder<'a>`]new().();
724 let axes = font_axesrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/font_axes().(&font)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
725 let axis_registry = AxisRegistryrust-analyzer cargo google-fonts-axisregistry 0.4.15 AxisRegistry#::newrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]new().();
726 let fallbacks_in_fvar: IndexMaprust-analyzer cargo indexmap 2.9.0 map/IndexMap#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<FallbackProto>> =
727 axis_registry.fallbacksrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]fallbacks().(&axes).collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().();
728
729 let mut fallbacks_in_siblings: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<(Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, FallbackProto)> = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![];
730 for fnt in siblings {
731 let family_name = best_familynamerust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/best_familyname().(fnt).unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or().("New Font".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().());
732 let subfamily_name = best_subfamilynamerust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/best_subfamilyname().(fnt).unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or().("Regular".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().());
733 let font_axes = font_axesrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/font_axes().(fnt).unwrap_or_defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap_or_default().();
734 fallbacks_in_siblings.extendrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/collect/Extend#extend().(
735 axis_registry
736 .name_table_fallbacksrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]name_table_fallbacks().(&family_name, &subfamily_name, &font_axes)
737 .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|(tag, proto)| (tag.to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(), proto.clone())),
738 )
739 }
740 // And for this font
741 let family_name = best_familynamerust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/best_familyname().(&font).unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or().("New Font".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().());
742 let subfamily_name = best_subfamilynamerust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/best_subfamilyname().(&font).unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or().("Regular".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().());
743 let fallbacks_in_names =
744 axis_registry.name_table_fallbacksrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]name_table_fallbacks().(&family_name, &subfamily_name, &axes);
745
746 let fvar: Fvarrust-analyzer cargo write-fonts 0.39.0 tables/fvar/Fvar# = font.fvarrust-analyzer cargo read-fonts 0.30.1 table_provider/TableProvider#fvar().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().().to_owned_tablerust-analyzer cargo write-fonts 0.39.0 from_obj/impl#[T][`ToOwnedTable<U>`]to_owned_table().();
747 let mut name: Namerust-analyzer cargo write-fonts 0.39.0 tables/name/Name# = font.namerust-analyzer cargo read-fonts 0.30.1 table_provider/TableProvider#name().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().().to_owned_tablerust-analyzer cargo write-fonts 0.39.0 from_obj/impl#[T][`ToOwnedTable<U>`]to_owned_table().();
748 let fvar_name_ids: HashSetrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/HashSet#<StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#> = fvar
749 .axis_instance_arraysrust-analyzer cargo write-fonts 0.39.0 tables/fvar/Fvar#axis_instance_arrays.
750 .instancesrust-analyzer cargo write-fonts 0.39.0 tables/fvar/AxisInstanceArrays#instances.
751 .iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().()
752 .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|x| x.subfamily_name_idrust-analyzer cargo write-fonts 0.39.0 tables/fvar/instance_record/InstanceRecord#subfamily_name_id.)
753 .chainrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#chain().(
754 fvar.axis_instance_arraysrust-analyzer cargo write-fonts 0.39.0 tables/fvar/Fvar#axis_instance_arrays.
755 .axesrust-analyzer cargo write-fonts 0.39.0 tables/fvar/AxisInstanceArrays#axes.
756 .iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().()
757 .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|x| x.axis_name_idrust-analyzer cargo write-fonts 0.39.0 tables/fvar/VariationAxisRecord#axis_name_id.),
758 )
759 .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().();
760 let keep = |name_id: StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#| -> bool {
761 name_id.to_u16rust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]to_u16().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().25 || fvar_name_ids.containsrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]contains().(&name_id)
762 };
763 let mut delete_ids = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![];
764 if let Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(stat) = font.statrust-analyzer cargo read-fonts 0.30.1 table_provider/TableProvider#stat().() {
765 for axis in stat.design_axesrust-analyzer cargo read-fonts 0.30.1 tables/stat/impl#[`TableRef<'a, StatMarker>`]design_axes().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch()..iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().() {
766 let id = axis.axis_name_idrust-analyzer cargo read-fonts 0.30.1 tables/stat/AxisRecord#axis_name_id..getrust-analyzer cargo font-types 0.9.0 raw/impl#[`BigEndian<T>`]get().();
767 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().keep(id) {
768 delete_ids.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(id);
769 }
770 }
771 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(axis_values) = stat.offset_to_axis_valuesrust-analyzer cargo read-fonts 0.30.1 tables/stat/impl#[`TableRef<'a, StatMarker>`]offset_to_axis_values().().transposerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<Result<T, E>>`]transpose().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch(). {
772 for axis_value in axis_values.axis_valuesrust-analyzer cargo read-fonts 0.30.1 tables/stat/impl#[`TableRef<'a, AxisValueArrayMarker>`]axis_values().().iterrust-analyzer cargo read-fonts 0.30.1 offset_array/impl#[`ArrayOfOffsets<'a, T, O>`]iter().().flattenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#flatten().() {
773 let id = axis_value.value_name_idrust-analyzer cargo read-fonts 0.30.1 tables/stat/impl#[`AxisValue<'a>`]value_name_id().();
774 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().keep(id) {
775 delete_ids.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(id);
776 }
777 }
778 }
779 }
780 name.name_recordrust-analyzer cargo write-fonts 0.39.0 tables/name/Name#name_record.
781 .retainrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]retain().(|record| !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().delete_ids.containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]contains().(&record.name_idrust-analyzer cargo write-fonts 0.39.0 tables/name/NameRecord#name_id.));
782 let mut axis_records: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<AxisRecordrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisRecord#> = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![];
783 let mut values: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<AxisValuerust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisValue#> = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![];
784 let mut seen_axes = HashSetrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/HashSet#::newrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T>`]new().();
785
786 fn make_locationrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/make_location().(axis: Tagrust-analyzer cargo font-types 0.9.0 tag/Tag#, value: f32, linked_value: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<f32>) -> AxisLocationrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisLocation# {
787 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(linked_value) = linked_value {
788 AxisLocationrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisLocation#::Threerust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisLocation#Three# {
789 tagrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisLocation#Three#tag.: axis,
790 valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisLocation#Three#value.: Fixedrust-analyzer cargo font-types 0.9.0 fixed/Fixed#::from_f64rust-analyzer cargo font-types 0.9.0 fixed/impl#[Fixed]from_f64().(value as f64),
791 linkedrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisLocation#Three#linked.: Fixedrust-analyzer cargo font-types 0.9.0 fixed/Fixed#::from_f64rust-analyzer cargo font-types 0.9.0 fixed/impl#[Fixed]from_f64().(linked_value as f64),
792 }
793 } else {
794 AxisLocationrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisLocation#::Onerust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisLocation#One# {
795 tagrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisLocation#One#tag.: axis,
796 valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisLocation#One#value.: Fixedrust-analyzer cargo font-types 0.9.0 fixed/Fixed#::from_f64rust-analyzer cargo font-types 0.9.0 fixed/impl#[Fixed]from_f64().(value as f64),
797 }
798 }
799 }
800
801 for (axis, fallbacks) in fallbacks_in_fvar.iter() {
802 let tag = Tagrust-analyzer cargo font-types 0.9.0 tag/Tag#::new_checkedrust-analyzer cargo font-types 0.9.0 tag/impl#[Tag]new_checked().(&axis.as_bytes()[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#4]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
803 let ar_axis = axis_registry.getrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]get().(axis).unwrap();
804 seen_axes.insertrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]insert().(tag);
805 axis_records.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(AxisRecordrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisRecord# {
806 tagrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisRecord#tag.,
807 namerust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisRecord#name.: ar_axis.display_name().to_string(),
808 orderingrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisRecord#ordering.: 0,
809 });
810 let fallback_values = fallbacks.iter().map(|f| f.value()).collect::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<f32>>();
811 for fallback in fallbacks.iter() {
812 values.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(AxisValuerust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisValue# {
813 flagsrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisValue#flags.: if fallback.value() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#eq().ar_axis.default_value() {
814 0x2
815 } else {
816 0x0
817 },
818 namerust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisValue#name.: fallback.name().to_string(),
819 locationrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisValue#location.: make_locationrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/make_location().(
820 tag,
821 fallback.value(),
822 linked_valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 linked_value().(axis, fallback.value())
823 .filterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]filter().(|value| fallback_values.contains(value)),
824 ),
825 })
826 }
827 }
828
829 for (axis, fallback) in fallbacks_in_names {
830 let tag = Tagrust-analyzer cargo font-types 0.9.0 tag/Tag#::new_checkedrust-analyzer cargo font-types 0.9.0 tag/impl#[Tag]new_checked().(&axis.as_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]as_bytes().()[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#4]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
831 if seen_axes.containsrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]contains().(&tag) {
832 continue;
833 }
834 // println!("Adding {} in names", axis);
835 seen_axes.insertrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]insert().(tag);
836
837 let ar_axis = axis_registry.getrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]get().(axis).unwrap();
838 axis_records.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(AxisRecordrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisRecord# {
839 tagrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisRecord#tag.,
840 namerust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisRecord#name.: ar_axis.display_name().to_string(),
841 orderingrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisRecord#ordering.: 0,
842 });
843 values.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(AxisValuerust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisValue# {
844 flagsrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisValue#flags.: 0x0,
845 namerust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisValue#name.: fallback.name().to_string(),
846 locationrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisValue#location.: make_locationrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/make_location().(
847 tag,
848 fallback.value(),
849 linked_valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 linked_value().(axis, fallback.value()),
850 ),
851 });
852 }
853
854 for (axis, _fallback) in fallbacks_in_siblings {
855 let tag = Tagrust-analyzer cargo font-types 0.9.0 tag/Tag#::new_checkedrust-analyzer cargo font-types 0.9.0 tag/impl#[Tag]new_checked().(&axis.as_bytesrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]as_bytes().()[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#4]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
856 if seen_axes.containsrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]contains().(&tag) {
857 continue;
858 }
859 seen_axes.insertrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]insert().(tag);
860
861 // println!("Adding {} in siblings", axis);
862 let ar_axis = axis_registry.getrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]get().(&axis).unwrap();
863 let elided_value = ar_axis.default_value();
864 axis_records.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(AxisRecordrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisRecord# {
865 tagrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisRecord#tag.,
866 namerust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisRecord#name.: ar_axis.display_name().to_string(),
867 orderingrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisRecord#ordering.: 0,
868 });
869 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(elided_fallback) = axis_registry.fallback_for_valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]fallback_for_value().(&axis, elided_value) {
870 values.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(AxisValuerust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisValue# {
871 flagsrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisValue#flags.: 0x2,
872 namerust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisValue#name.: elided_fallback.name().to_string(),
873 locationrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisValue#location.: make_locationrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/make_location().(tag, elided_value, linked_valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 linked_value().(&axis, elided_value)),
874 })
875 }
876 }
877 axis_records.iter_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter_mut().().enumeraterust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#enumerate().().for_eachrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#for_each().(|(i, record)| {
878 record.orderingrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/AxisRecord#ordering. = i as u16;
879 });
880
881 let stat_builder = StatBuilderrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/StatBuilder# {
882 recordsrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/StatBuilder#records.: axis_records,
883 valuesrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/StatBuilder#values.,
884 };
885 let stat = stat_builder.buildrust-analyzer cargo google-fonts-axisregistry 0.4.15 stat/impl#[StatBuilder]build().(&mut name.name_recordrust-analyzer cargo write-fonts 0.39.0 tables/name/Name#name_record.);
886 name.name_recordrust-analyzer cargo write-fonts 0.39.0 tables/name/Name#name_record..sortrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/impl#[`[T]`]sort().();
887 new_font.add_tablerust-analyzer cargo write-fonts 0.39.0 font_builder/impl#[`FontBuilder<'a>`]add_table().(&name)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
888 new_font.add_tablerust-analyzer cargo write-fonts 0.39.0 font_builder/impl#[`FontBuilder<'a>`]add_table().(&stat)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
889 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(new_font.copy_missing_tablesrust-analyzer cargo write-fonts 0.39.0 font_builder/impl#[`FontBuilder<'a>`]copy_missing_tables().(font).buildrust-analyzer cargo write-fonts 0.39.0 font_builder/impl#[`FontBuilder<'a>`]build().())
890 }
891
892 pub fn build_filenamerust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/build_filename().(font: FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#, extension: &str) -> Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String# {
893 let family_name = best_familynamerust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/best_familyname().(&font)
894 .unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or().("New Font".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().())
895 .replacerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str]replace().(" ", "");
896 let style_name = best_subfamilynamerust-analyzer cargo google-fonts-axisregistry 0.4.15 nametable/best_subfamilyname().(&font).unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or().("Regular".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().());
897 if font.table_datarust-analyzer cargo read-fonts 0.30.1 impl#[`FontRef<'a>`]table_data().(Tagrust-analyzer cargo font-types 0.9.0 tag/Tag#::newrust-analyzer cargo font-types 0.9.0 tag/impl#[Tag]new().(b"fvar")).is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().() {
898 let is_italic = style_name.containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]contains().("Italic");
899 let axes = font_axesrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/font_axes().(&font).unwrap_or_defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap_or_default().();
900 // Sort uppercase axes first, then lowercase axes
901 let mut axes = axes
902 .iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().()
903 .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|axis| axis.tagrust-analyzer cargo google-fonts-axisregistry 0.4.15 FontAxis#tag..to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().())
904 .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<_>>();
905 axes.sortrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/impl#[`[T]`]sort().();
906 let axes = axes.joinrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/impl#[`[T]`]join().(",");
907 return formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!(
908 "{}{}[{}].{}",
909 family_name,
910 if is_italic { "-Italic" } else { "" },
911 axes,
912 extension
913 );
914 }
915 formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("{family_name}-{style_name}.{extension}").replacerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str]replace().(" ", "")
916 }
917 }
918
919 #[cfg(feature = "fontations")]
920 pub use fontations_implrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/::*;
921
922 #[cfg(test)]
923 mod testsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/ {
924 use fontationsrust-analyzer cargo fontations 0.2.0 crate/::{
925 skrifarust-analyzer cargo skrifa 0.32.0 crate/::{stringrust-analyzer cargo skrifa 0.32.0 string/::StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#, MetadataProviderrust-analyzer cargo skrifa 0.32.0 provider/MetadataProvider#, Tagrust-analyzer cargo font-types 0.9.0 tag/Tag#},
926 writerust-analyzer cargo write-fonts 0.39.0 crate/::{
927 from_objrust-analyzer cargo write-fonts 0.39.0 from_obj/::ToOwnedTablerust-analyzer cargo write-fonts 0.39.0 from_obj/ToOwnedTable#,
928 tablesrust-analyzer cargo write-fonts 0.39.0 tables/::{
929 namerust-analyzer cargo write-fonts 0.39.0 tables/name/::Namerust-analyzer cargo write-fonts 0.39.0 tables/name/Name#,
930 statrust-analyzer cargo write-fonts 0.39.0 tables/stat/::{AxisValuerust-analyzer cargo write-fonts 0.39.0 tables/stat/AxisValue#, Statrust-analyzer cargo write-fonts 0.39.0 tables/stat/Stat#},
931 },
932 },
933 };
934 use pretty_assertionsrust-analyzer cargo pretty_assertions 1.4.1 crate/::assert_eqrust-analyzer cargo pretty_assertions 1.4.1 assert_eq!;
935
936 use superrust-analyzer cargo google-fonts-axisregistry 0.4.15 crate/::*;
937
938 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
939 fn opszrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/opsz().() {
940 let ar = AxisRegistryrust-analyzer cargo google-fonts-axisregistry 0.4.15 AxisRegistry#::newrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]new().();
941 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(ar.contains_keyrust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry]contains_key().("opsz"));
942 assert_eqrust-analyzer cargo pretty_assertions 1.4.1 assert_eq!!(ar[rust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry][`Index<&str>`]index()."opsz"]rust-analyzer cargo google-fonts-axisregistry 0.4.15 impl#[AxisRegistry][`Index<&str>`]index()..display_name.as_deref(), Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Optical Size"));
943 }
944 const MAVEN_PROrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/MAVEN_PRO.: &[u8; 83576] = include_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/include_bytes!!("../tests/data/MavenPro-Regular.ttf");
945 const OPEN_SANSrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS.: &[u8; 532636] = include_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/include_bytes!!("../tests/data/OpenSans[wdth,wght].ttf");
946 const OPEN_SANS_ITALICrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS_ITALIC.: &[u8; 584112] =
947 include_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/include_bytes!!("../tests/data/OpenSans-Italic[wdth,wght].ttf");
948 const OPEN_SANS_CONDENSEDrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS_CONDENSED.: &[u8; 973780] =
949 include_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/include_bytes!!("../tests/data/OpenSansCondensed[wght].ttf");
950 const OPEN_SANS_CONDENSED_ITALICrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS_CONDENSED_ITALIC.: &[u8; 1054652] =
951 include_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/include_bytes!!("../tests/data/OpenSansCondensed-Italic[wght].ttf");
952 const WONKYrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/WONKY.: &[u8; 532564] = include_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/include_bytes!!("../tests/data/Wonky[wdth,wght].ttf");
953 const PLAYFAIRrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/PLAYFAIR.: &[u8; 1150824] = include_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/include_bytes!!("../tests/data/Playfair[opsz,wdth,wght].ttf");
954
955 struct NameTableTestCaserust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase# {
956 binaryrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#binary.: &'static [u8],
957 family_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#family_name.: &'static str,
958 subfamily_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#subfamily_name.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'static str>,
959 siblingsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#siblings.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<&'static [u8]>,
960 expectationsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#expectations.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<(StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#, Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'static str>)>,
961 }
962
963 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
964 fn test_name_tablerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/test_name_table().() {
965 let cases: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<NameTableTestCaserust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#> = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
966 NameTableTestCaserust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase# {
967 binaryrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#binary.: MAVEN_PROrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/MAVEN_PRO.,
968 family_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#family_name.: "Maven Pro",
969 subfamily_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#subfamily_name.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Regular"),
970 siblingsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#siblings.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![],
971 expectationsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#expectations.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
972 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Maven Pro")),
973 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]SUBFAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Regular")),
974 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::UNIQUE_IDrust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]UNIQUE_ID., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("2.003;NONE;MavenPro-Regular")),
975 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FULL_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FULL_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Maven Pro Regular")),
976 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::POSTSCRIPT_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]POSTSCRIPT_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("MavenPro-Regular")),
977 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_FAMILY_NAME., Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
978 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_SUBFAMILY_NAME., Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
979 ],
980 },
981 NameTableTestCaserust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase# {
982 binaryrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#binary.: MAVEN_PROrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/MAVEN_PRO.,
983 family_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#family_name.: "Maven Pro",
984 subfamily_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#subfamily_name.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Italic"),
985 siblingsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#siblings.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![],
986 expectationsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#expectations.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
987 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Maven Pro")),
988 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]SUBFAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Italic")),
989 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::UNIQUE_IDrust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]UNIQUE_ID., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("2.003;NONE;MavenPro-Italic")),
990 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FULL_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FULL_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Maven Pro Italic")),
991 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::POSTSCRIPT_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]POSTSCRIPT_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("MavenPro-Italic")),
992 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_FAMILY_NAME., Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
993 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_SUBFAMILY_NAME., Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
994 ],
995 },
996 NameTableTestCaserust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase# {
997 binaryrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#binary.: MAVEN_PROrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/MAVEN_PRO.,
998 family_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#family_name.: "Maven Pro",
999 subfamily_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#subfamily_name.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Bold"),
1000 siblingsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#siblings.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![],
1001 expectationsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#expectations.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
1002 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Maven Pro")),
1003 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]SUBFAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Bold")),
1004 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::UNIQUE_IDrust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]UNIQUE_ID., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("2.003;NONE;MavenPro-Bold")),
1005 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FULL_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FULL_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Maven Pro Bold")),
1006 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::POSTSCRIPT_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]POSTSCRIPT_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("MavenPro-Bold")),
1007 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_FAMILY_NAME., Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1008 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_SUBFAMILY_NAME., Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1009 ],
1010 },
1011 NameTableTestCaserust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase# {
1012 binaryrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#binary.: MAVEN_PROrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/MAVEN_PRO.,
1013 family_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#family_name.: "Maven Pro",
1014 subfamily_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#subfamily_name.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Bold Italic"),
1015 siblingsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#siblings.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![],
1016 expectationsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#expectations.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
1017 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Maven Pro")),
1018 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]SUBFAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Bold Italic")),
1019 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::UNIQUE_IDrust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]UNIQUE_ID., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("2.003;NONE;MavenPro-BoldItalic")),
1020 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FULL_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FULL_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Maven Pro Bold Italic")),
1021 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::POSTSCRIPT_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]POSTSCRIPT_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("MavenPro-BoldItalic")),
1022 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_FAMILY_NAME., Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1023 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_SUBFAMILY_NAME., Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1024 ],
1025 },
1026 NameTableTestCaserust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase# {
1027 binaryrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#binary.: MAVEN_PROrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/MAVEN_PRO.,
1028 family_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#family_name.: "Maven Pro",
1029 subfamily_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#subfamily_name.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Black"),
1030 siblingsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#siblings.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![],
1031 expectationsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#expectations.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
1032 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Maven Pro Black")),
1033 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]SUBFAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Regular")),
1034 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::UNIQUE_IDrust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]UNIQUE_ID., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("2.003;NONE;MavenPro-Black")),
1035 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FULL_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FULL_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Maven Pro Black")),
1036 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::POSTSCRIPT_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]POSTSCRIPT_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("MavenPro-Black")),
1037 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_FAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Maven Pro")),
1038 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_SUBFAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Black")),
1039 ],
1040 },
1041 NameTableTestCaserust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase# {
1042 binaryrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#binary.: MAVEN_PROrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/MAVEN_PRO.,
1043 family_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#family_name.: "Maven Pro",
1044 subfamily_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#subfamily_name.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Black Italic"),
1045 siblingsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#siblings.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![],
1046 expectationsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#expectations.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
1047 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Maven Pro Black")),
1048 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]SUBFAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Italic")),
1049 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::UNIQUE_IDrust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]UNIQUE_ID., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("2.003;NONE;MavenPro-BlackItalic")),
1050 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FULL_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FULL_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Maven Pro Black Italic")),
1051 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::POSTSCRIPT_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]POSTSCRIPT_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("MavenPro-BlackItalic")),
1052 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_FAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Maven Pro")),
1053 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_SUBFAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Black Italic")),
1054 ],
1055 },
1056 NameTableTestCaserust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase# {
1057 binaryrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#binary.: MAVEN_PROrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/MAVEN_PRO.,
1058 family_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#family_name.: "Maven Pro",
1059 subfamily_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#subfamily_name.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("ExtraLight Italic"),
1060 siblingsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#siblings.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![],
1061 expectationsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#expectations.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
1062 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Maven Pro ExtraLight")),
1063 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]SUBFAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Italic")),
1064 (
1065 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::UNIQUE_IDrust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]UNIQUE_ID.,
1066 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("2.003;NONE;MavenPro-ExtraLightItalic"),
1067 ),
1068 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FULL_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FULL_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Maven Pro ExtraLight Italic")),
1069 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::POSTSCRIPT_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]POSTSCRIPT_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("MavenPro-ExtraLightItalic")),
1070 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_FAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Maven Pro")),
1071 (
1072 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_SUBFAMILY_NAME.,
1073 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("ExtraLight Italic"),
1074 ),
1075 ],
1076 },
1077 NameTableTestCaserust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase# {
1078 binaryrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#binary.: MAVEN_PROrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/MAVEN_PRO.,
1079 family_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#family_name.: "Maven Pro",
1080 subfamily_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#subfamily_name.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("UltraExpanded Regular"),
1081 siblingsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#siblings.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![],
1082 expectationsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#expectations.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
1083 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Maven Pro UltraExpanded")),
1084 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]SUBFAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Regular")),
1085 (
1086 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::UNIQUE_IDrust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]UNIQUE_ID.,
1087 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("2.003;NONE;MavenProUltraExpanded-Regular"),
1088 ),
1089 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FULL_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FULL_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Maven Pro UltraExpanded Regular")),
1090 (
1091 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::POSTSCRIPT_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]POSTSCRIPT_NAME.,
1092 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("MavenProUltraExpanded-Regular"),
1093 ),
1094 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_FAMILY_NAME., Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1095 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_SUBFAMILY_NAME., Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1096 ],
1097 },
1098 NameTableTestCaserust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase# {
1099 binaryrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#binary.: MAVEN_PROrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/MAVEN_PRO.,
1100 family_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#family_name.: "Maven Pro",
1101 subfamily_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#subfamily_name.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Condensed ExtraLight Italic"),
1102 siblingsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#siblings.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![],
1103 expectationsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#expectations.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
1104 (
1105 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FAMILY_NAME.,
1106 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Maven Pro Condensed ExtraLight"),
1107 ),
1108 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]SUBFAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Italic")),
1109 (
1110 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::UNIQUE_IDrust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]UNIQUE_ID.,
1111 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("2.003;NONE;MavenProCondensed-ExtraLightItalic"),
1112 ),
1113 (
1114 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FULL_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FULL_NAME.,
1115 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Maven Pro Condensed ExtraLight Italic"),
1116 ),
1117 (
1118 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::POSTSCRIPT_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]POSTSCRIPT_NAME.,
1119 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("MavenProCondensed-ExtraLightItalic"),
1120 ),
1121 (
1122 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_FAMILY_NAME.,
1123 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Maven Pro Condensed"),
1124 ),
1125 (
1126 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_SUBFAMILY_NAME.,
1127 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("ExtraLight Italic"),
1128 ),
1129 ],
1130 },
1131 NameTableTestCaserust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase# {
1132 binaryrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#binary.: OPEN_SANSrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS.,
1133 family_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#family_name.: "Open Sans",
1134 subfamily_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#subfamily_name.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
1135 siblingsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#siblings.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
1136 OPEN_SANS_ITALICrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS_ITALIC.,
1137 OPEN_SANS_CONDENSEDrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS_CONDENSED.,
1138 OPEN_SANS_CONDENSED_ITALICrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS_CONDENSED_ITALIC.,
1139 ],
1140 expectationsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#expectations.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
1141 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Open Sans")),
1142 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]SUBFAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Regular")),
1143 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::UNIQUE_IDrust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]UNIQUE_ID., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("3.000;GOOG;OpenSans-Regular")),
1144 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FULL_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FULL_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Open Sans Regular")),
1145 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::POSTSCRIPT_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]POSTSCRIPT_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("OpenSans-Regular")),
1146 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_FAMILY_NAME., Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1147 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_SUBFAMILY_NAME., Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1148 (
1149 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::VARIATIONS_POSTSCRIPT_NAME_PREFIXrust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]VARIATIONS_POSTSCRIPT_NAME_PREFIX.,
1150 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("OpenSans"),
1151 ),
1152 ],
1153 },
1154 NameTableTestCaserust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase# {
1155 binaryrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#binary.: OPEN_SANS_ITALICrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS_ITALIC.,
1156 family_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#family_name.: "Open Sans",
1157 subfamily_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#subfamily_name.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
1158 siblingsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#siblings.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![OPEN_SANSrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS., OPEN_SANS_CONDENSEDrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS_CONDENSED., OPEN_SANS_CONDENSED_ITALICrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS_CONDENSED_ITALIC.],
1159 expectationsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#expectations.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
1160 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Open Sans")),
1161 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]SUBFAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Italic")),
1162 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::UNIQUE_IDrust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]UNIQUE_ID., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("3.000;GOOG;OpenSans-Italic")),
1163 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FULL_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FULL_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Open Sans Italic")),
1164 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::POSTSCRIPT_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]POSTSCRIPT_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("OpenSans-Italic")),
1165 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_FAMILY_NAME., Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1166 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_SUBFAMILY_NAME., Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1167 (
1168 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::VARIATIONS_POSTSCRIPT_NAME_PREFIXrust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]VARIATIONS_POSTSCRIPT_NAME_PREFIX.,
1169 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("OpenSansItalic"),
1170 ),
1171 ],
1172 },
1173 NameTableTestCaserust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase# {
1174 binaryrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#binary.: OPEN_SANS_CONDENSEDrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS_CONDENSED.,
1175 family_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#family_name.: "Open Sans Condensed",
1176 subfamily_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#subfamily_name.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
1177 siblingsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#siblings.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![OPEN_SANSrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS., OPEN_SANS_ITALICrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS_ITALIC., OPEN_SANS_CONDENSED_ITALICrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS_CONDENSED_ITALIC.],
1178 expectationsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#expectations.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
1179 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Open Sans Condensed")),
1180 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]SUBFAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Regular")),
1181 (
1182 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::UNIQUE_IDrust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]UNIQUE_ID.,
1183 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("3.000;GOOG;OpenSansCondensed-Regular"),
1184 ),
1185 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FULL_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FULL_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Open Sans Condensed Regular")),
1186 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::POSTSCRIPT_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]POSTSCRIPT_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("OpenSansCondensed-Regular")),
1187 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_FAMILY_NAME., Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1188 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_SUBFAMILY_NAME., Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1189 (
1190 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::VARIATIONS_POSTSCRIPT_NAME_PREFIXrust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]VARIATIONS_POSTSCRIPT_NAME_PREFIX.,
1191 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("OpenSansCondensed"),
1192 ),
1193 ],
1194 },
1195 NameTableTestCaserust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase# {
1196 binaryrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#binary.: OPEN_SANS_CONDENSED_ITALICrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS_CONDENSED_ITALIC.,
1197 family_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#family_name.: "Open Sans Condensed",
1198 subfamily_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#subfamily_name.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
1199 siblingsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#siblings.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![OPEN_SANSrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS., OPEN_SANS_ITALICrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS_ITALIC., OPEN_SANS_CONDENSEDrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS_CONDENSED.],
1200 expectationsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#expectations.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
1201 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Open Sans Condensed")),
1202 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]SUBFAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Italic")),
1203 (
1204 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::UNIQUE_IDrust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]UNIQUE_ID.,
1205 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("3.000;GOOG;OpenSansCondensed-Italic"),
1206 ),
1207 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FULL_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FULL_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Open Sans Condensed Italic")),
1208 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::POSTSCRIPT_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]POSTSCRIPT_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("OpenSansCondensed-Italic")),
1209 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_FAMILY_NAME., Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1210 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_SUBFAMILY_NAME., Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1211 (
1212 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::VARIATIONS_POSTSCRIPT_NAME_PREFIXrust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]VARIATIONS_POSTSCRIPT_NAME_PREFIX.,
1213 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("OpenSansCondensedItalic"),
1214 ),
1215 ],
1216 },
1217 // Bad names
1218 NameTableTestCaserust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase# {
1219 binaryrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#binary.: MAVEN_PROrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/MAVEN_PRO.,
1220 family_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#family_name.: "Maven Pro",
1221 subfamily_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#subfamily_name.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Fat"),
1222 siblingsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#siblings.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![],
1223 expectationsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#expectations.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
1224 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Maven Pro Fat")),
1225 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]SUBFAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Regular")),
1226 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::UNIQUE_IDrust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]UNIQUE_ID., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("2.003;NONE;MavenProFat-Regular")),
1227 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FULL_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FULL_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Maven Pro Fat Regular")),
1228 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::POSTSCRIPT_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]POSTSCRIPT_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("MavenProFat-Regular")),
1229 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_FAMILY_NAME., Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1230 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_SUBFAMILY_NAME., Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1231 ],
1232 },
1233 NameTableTestCaserust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase# {
1234 binaryrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#binary.: WONKYrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/WONKY.,
1235 family_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#family_name.: "Wonky",
1236 subfamily_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#subfamily_name.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
1237 siblingsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#siblings.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![],
1238 expectationsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#expectations.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
1239 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Wonky")),
1240 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]SUBFAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Regular")),
1241 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::UNIQUE_IDrust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]UNIQUE_ID., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("3.000;GOOG;Wonky-Regular")),
1242 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FULL_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FULL_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Wonky Regular")),
1243 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::POSTSCRIPT_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]POSTSCRIPT_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Wonky-Regular")),
1244 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_FAMILY_NAME., Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1245 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_SUBFAMILY_NAME., Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1246 ],
1247 },
1248 NameTableTestCaserust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase# {
1249 binaryrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#binary.: PLAYFAIRrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/PLAYFAIR.,
1250 family_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#family_name.: "Playfair",
1251 subfamily_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#subfamily_name.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
1252 siblingsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#siblings.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![],
1253 expectationsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#expectations.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
1254 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Playfair SemiExpanded Light")),
1255 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]SUBFAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Regular")),
1256 (
1257 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::UNIQUE_IDrust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]UNIQUE_ID.,
1258 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("2.000;FTH;Playfair-SemiExpandedLight"),
1259 ),
1260 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FULL_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FULL_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Playfair SemiExpanded Light")),
1261 (
1262 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::POSTSCRIPT_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]POSTSCRIPT_NAME.,
1263 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Playfair-SemiExpandedLight"),
1264 ),
1265 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_FAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_FAMILY_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Playfair")),
1266 (
1267 StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::TYPOGRAPHIC_SUBFAMILY_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]TYPOGRAPHIC_SUBFAMILY_NAME.,
1268 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("SemiExpanded Light"),
1269 ),
1270 ],
1271 },
1272 ];
1273
1274 run_name_table_testsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/run_name_table_tests().(&cases, Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#);
1275 }
1276
1277 fn run_name_table_testsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/run_name_table_tests().(cases: &[NameTableTestCaserust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#], aggression: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<RenameAggressivenessrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/RenameAggressiveness#>) {
1278 for (ix, case) in cases.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().enumeraterust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#enumerate().() {
1279 let font = FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#::newrust-analyzer cargo read-fonts 0.30.1 impl#[`FontRef<'a>`]new().(case.binaryrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#binary.).expectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]expect().("Failed to read font");
1280 let siblings: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#> = case
1281 .siblingsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#siblings.
1282 .iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().()
1283 .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|b| FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#::newrust-analyzer cargo read-fonts 0.30.1 impl#[`FontRef<'a>`]new().(b).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().())
1284 .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().();
1285 let result = build_name_tablerust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/build_name_table().(
1286 font,
1287 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(case.family_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#family_name.),
1288 case.subfamily_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#subfamily_name.,
1289 &siblings,
1290 aggression,
1291 )
1292 .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().();
1293 let result_font = FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#::newrust-analyzer cargo read-fonts 0.30.1 impl#[`FontRef<'a>`]new().(&result).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().();
1294 for (id, expectation) in case.expectationsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#expectations..iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().() {
1295 let record = result_font.localized_stringsrust-analyzer cargo skrifa 0.32.0 provider/impl#[`FontRef<'a>`][`MetadataProvider<'a>`]localized_strings().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().id).english_or_firstrust-analyzer cargo skrifa 0.32.0 string/impl#[`LocalizedStrings<'a>`]english_or_first().();
1296 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(expectation) = expectation {
1297 assert_eqrust-analyzer cargo pretty_assertions 1.4.1 assert_eq!!(
1298 record.unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().().charsrust-analyzer cargo skrifa 0.32.0 string/impl#[`LocalizedString<'a>`]chars().().collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>(),
1299 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().expectation,
1300 "Case {}, {}",
1301 ix +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). 1,
1302 id
1303 );
1304 } else {
1305 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(record.is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().());
1306 }
1307 }
1308 }
1309 }
1310
1311 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
1312 fn test_name_table_aggressionrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/test_name_table_aggression().() {
1313 let cases = [
1314 NameTableTestCaserust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase# {
1315 binaryrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#binary.: MAVEN_PROrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/MAVEN_PRO.,
1316 family_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#family_name.: "Raven Am",
1317 subfamily_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#subfamily_name.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Regular"),
1318 siblingsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#siblings.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![],
1319 expectationsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#expectations.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
1320 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::COPYRIGHT_NOTICErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]COPYRIGHT_NOTICE., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Copyright 2011 The Raven Am Project Authors (http://www.vissol.co.uk/mavenpro/), with Reserved Font Name \"Raven Am\".")),
1321 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FULL_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FULL_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Raven Am Regular")),
1322 ]
1323 }
1324 ];
1325 run_name_table_testsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/run_name_table_tests().(&cases, Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(RenameAggressivenessrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/RenameAggressiveness#::Aggressiverust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/RenameAggressiveness#Aggressive#));
1326 let cases = [
1327 NameTableTestCaserust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase# {
1328 binaryrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#binary.: MAVEN_PROrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/MAVEN_PRO.,
1329 family_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#family_name.: "Raven Am",
1330 subfamily_namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#subfamily_name.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Regular"),
1331 siblingsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#siblings.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![],
1332 expectationsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/NameTableTestCase#expectations.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
1333 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::COPYRIGHT_NOTICErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]COPYRIGHT_NOTICE., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Copyright 2011 The Maven Pro Project Authors (http://www.vissol.co.uk/mavenpro/), with Reserved Font Name \"Maven Pro\".")),
1334 (StringIdrust-analyzer cargo font-types 0.9.0 name_id/NameId#::FULL_NAMErust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId]FULL_NAME., Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("Raven Am Regular")),
1335 ]
1336 }
1337 ];
1338 run_name_table_testsrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/run_name_table_tests().(&cases, Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(RenameAggressivenessrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/RenameAggressiveness#::Conservativerust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/RenameAggressiveness#Conservative#));
1339 }
1340
1341 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:)]
1342 struct DumpStatValuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/DumpStatValue#<'a> {
1343 axisrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/DumpStatValue#axis.: Tagrust-analyzer cargo font-types 0.9.0 tag/Tag#,
1344 namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/DumpStatValue#name.: &'a str,
1345 valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/DumpStatValue#value.: f32,
1346 linkedrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/DumpStatValue#linked.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<f32>,
1347 }
1348
1349 fn dump_stat_valuesrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/dump_stat_values().<'a>(stat: &Statrust-analyzer cargo write-fonts 0.39.0 tables/stat/Stat#, name: &'a Namerust-analyzer cargo write-fonts 0.39.0 tables/name/Name#) -> Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<DumpStatValuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/DumpStatValue#<'a>> {
1350 let mut values = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![];
1351 let tags = stat
1352 .design_axesrust-analyzer cargo write-fonts 0.39.0 tables/stat/Stat#design_axes.
1353 .iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().()
1354 .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|a| a.axis_tagrust-analyzer cargo write-fonts 0.39.0 tables/stat/AxisRecord#axis_tag.)
1355 .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<_>>();
1356 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(axis_values) = stat.offset_to_axis_valuesrust-analyzer cargo write-fonts 0.39.0 tables/stat/Stat#offset_to_axis_values..as_refrust-analyzer cargo write-fonts 0.39.0 offsets/impl#[`NullableOffsetMarker<T, N>`]as_ref().() {
1357 for axis_value in axis_values.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().() {
1358 match axis_value.as_refrust-analyzer cargo write-fonts 0.39.0 offsets/impl#[`OffsetMarker<T, N>`][`AsRef<T>`]as_ref().() {
1359 AxisValuerust-analyzer cargo write-fonts 0.39.0 tables/stat/AxisValue#::Format1rust-analyzer cargo write-fonts 0.39.0 tables/stat/AxisValue#Format1#(v) => values.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(DumpStatValuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/DumpStatValue# {
1360 axisrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/DumpStatValue#axis.: tags[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().v.axis_indexrust-analyzer cargo write-fonts 0.39.0 tables/stat/AxisValueFormat1#axis_index. as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().,
1361 namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/DumpStatValue#name.: name
1362 .name_recordrust-analyzer cargo write-fonts 0.39.0 tables/name/Name#name_record.
1363 .iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().()
1364 .findrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/impl#[`Iter<'a, T>`][Iterator]find().(|record| record.name_idrust-analyzer cargo write-fonts 0.39.0 tables/name/NameRecord#name_id. rust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId][`PartialEq<Self>`]eq().==rust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId][`PartialEq<Self>`]eq(). rust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId][`PartialEq<Self>`]eq().v.value_name_idrust-analyzer cargo write-fonts 0.39.0 tables/stat/AxisValueFormat1#value_name_id.)
1365 .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]map().(|record| record.stringrust-analyzer cargo write-fonts 0.39.0 tables/name/NameRecord#string..as_strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]as_str().())
1366 .unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or().(""),
1367 valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/DumpStatValue#value.: v.valuerust-analyzer cargo write-fonts 0.39.0 tables/stat/AxisValueFormat1#value..to_f32rust-analyzer cargo font-types 0.9.0 fixed/impl#[Fixed]to_f32().(),
1368 linkedrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/DumpStatValue#linked.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
1369 }),
1370 AxisValuerust-analyzer cargo write-fonts 0.39.0 tables/stat/AxisValue#::Format2rust-analyzer cargo write-fonts 0.39.0 tables/stat/AxisValue#Format2#(_) => {
1371 panicrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/panic!!("I didn't produce this")
1372 }
1373 AxisValuerust-analyzer cargo write-fonts 0.39.0 tables/stat/AxisValue#::Format3rust-analyzer cargo write-fonts 0.39.0 tables/stat/AxisValue#Format3#(v) => values.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(DumpStatValuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/DumpStatValue# {
1374 axisrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/DumpStatValue#axis.: tags[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().v.axis_indexrust-analyzer cargo write-fonts 0.39.0 tables/stat/AxisValueFormat3#axis_index. as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().,
1375 namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/DumpStatValue#name.: name
1376 .name_recordrust-analyzer cargo write-fonts 0.39.0 tables/name/Name#name_record.
1377 .iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().()
1378 .findrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/impl#[`Iter<'a, T>`][Iterator]find().(|record| record.name_idrust-analyzer cargo write-fonts 0.39.0 tables/name/NameRecord#name_id. rust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId][`PartialEq<Self>`]eq().==rust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId][`PartialEq<Self>`]eq(). rust-analyzer cargo font-types 0.9.0 name_id/impl#[NameId][`PartialEq<Self>`]eq().v.value_name_idrust-analyzer cargo write-fonts 0.39.0 tables/stat/AxisValueFormat3#value_name_id.)
1379 .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]map().(|record| record.stringrust-analyzer cargo write-fonts 0.39.0 tables/name/NameRecord#string..as_strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]as_str().())
1380 .unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or().(""),
1381 valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/DumpStatValue#value.: v.valuerust-analyzer cargo write-fonts 0.39.0 tables/stat/AxisValueFormat3#value..to_f32rust-analyzer cargo font-types 0.9.0 fixed/impl#[Fixed]to_f32().(),
1382 linkedrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/DumpStatValue#linked.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(v.linked_valuerust-analyzer cargo write-fonts 0.39.0 tables/stat/AxisValueFormat3#linked_value..to_f32rust-analyzer cargo font-types 0.9.0 fixed/impl#[Fixed]to_f32().()),
1383 }),
1384 AxisValuerust-analyzer cargo write-fonts 0.39.0 tables/stat/AxisValue#::Format4rust-analyzer cargo write-fonts 0.39.0 tables/stat/AxisValue#Format4#(_) => {
1385 panicrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/panic!!("I didn't produce this")
1386 }
1387 }
1388 }
1389 }
1390 values
1391 }
1392
1393 fn valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/value().<'a>(axis: &str, name: &'a str, value: f32, linked: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<f32>) -> DumpStatValuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/DumpStatValue#<'a> {
1394 DumpStatValuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/DumpStatValue# {
1395 axisrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/DumpStatValue#axis.: Tagrust-analyzer cargo font-types 0.9.0 tag/Tag#::new_checkedrust-analyzer cargo font-types 0.9.0 tag/impl#[Tag]new_checked().(axis.as_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]as_bytes().()).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
1396 namerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/DumpStatValue#name.,
1397 valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/DumpStatValue#value.,
1398 linkedrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/DumpStatValue#linked.,
1399 }
1400 }
1401
1402 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
1403 fn test_build_statrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/test_build_stat().() {
1404 let font_data = build_statrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/build_stat().(
1405 FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#::newrust-analyzer cargo read-fonts 0.30.1 impl#[`FontRef<'a>`]new().(OPEN_SANSrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS.).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
1406 &[
1407 FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#::newrust-analyzer cargo read-fonts 0.30.1 impl#[`FontRef<'a>`]new().(OPEN_SANS_ITALICrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS_ITALIC.).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
1408 FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#::newrust-analyzer cargo read-fonts 0.30.1 impl#[`FontRef<'a>`]new().(OPEN_SANS_CONDENSEDrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS_CONDENSED.).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
1409 FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#::newrust-analyzer cargo read-fonts 0.30.1 impl#[`FontRef<'a>`]new().(OPEN_SANS_CONDENSED_ITALICrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS_CONDENSED_ITALIC.).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
1410 ],
1411 )
1412 .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().();
1413 let new_font = FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#::newrust-analyzer cargo read-fonts 0.30.1 impl#[`FontRef<'a>`]new().(&font_data).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().();
1414 let new_stat: Statrust-analyzer cargo write-fonts 0.39.0 tables/stat/Stat# = new_font.statrust-analyzer cargo read-fonts 0.30.1 table_provider/TableProvider#stat().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().().to_owned_tablerust-analyzer cargo write-fonts 0.39.0 from_obj/impl#[T][`ToOwnedTable<U>`]to_owned_table().();
1415 let name: Namerust-analyzer cargo write-fonts 0.39.0 tables/name/Name# = new_font.namerust-analyzer cargo read-fonts 0.30.1 table_provider/TableProvider#name().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().().to_owned_tablerust-analyzer cargo write-fonts 0.39.0 from_obj/impl#[T][`ToOwnedTable<U>`]to_owned_table().();
1416 // We expect three axes, wght, wdth, and ital
1417 assert_eqrust-analyzer cargo pretty_assertions 1.4.1 assert_eq!!(
1418 new_stat
1419 .design_axesrust-analyzer cargo write-fonts 0.39.0 tables/stat/Stat#design_axes.
1420 .iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().()
1421 .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|a| a.axis_tagrust-analyzer cargo write-fonts 0.39.0 tables/stat/AxisRecord#axis_tag.)
1422 .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<_>>(),
1423 vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![Tagrust-analyzer cargo font-types 0.9.0 tag/Tag#::newrust-analyzer cargo font-types 0.9.0 tag/impl#[Tag]new().(b"wght"), Tagrust-analyzer cargo font-types 0.9.0 tag/Tag#::newrust-analyzer cargo font-types 0.9.0 tag/impl#[Tag]new().(b"wdth"), Tagrust-analyzer cargo font-types 0.9.0 tag/Tag#::newrust-analyzer cargo font-types 0.9.0 tag/impl#[Tag]new().(b"ital")]
1424 );
1425 assert_eqrust-analyzer cargo pretty_assertions 1.4.1 assert_eq!!(
1426 dump_stat_valuesrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/dump_stat_values().(&new_stat, &name),
1427 vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
1428 valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/value().("wght", "Light", 300.0, Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1429 valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/value().("wght", "Regular", 400.0, Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(700.0)),
1430 valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/value().("wght", "Medium", 500.0, Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1431 valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/value().("wght", "SemiBold", 600.0, Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1432 valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/value().("wght", "Bold", 700.0, Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1433 valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/value().("wght", "ExtraBold", 800.0, Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1434 valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/value().("wdth", "Condensed", 75.0, Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1435 valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/value().("wdth", "SemiCondensed", 87.5, Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1436 valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/value().("wdth", "Normal", 100.0, Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1437 valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/value().("ital", "Roman", 0.0, Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(1.0)),
1438 ]
1439 )
1440 }
1441
1442 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
1443 fn test_build_stat2rust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/test_build_stat2().() {
1444 let font_data = build_statrust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/build_stat().(
1445 FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#::newrust-analyzer cargo read-fonts 0.30.1 impl#[`FontRef<'a>`]new().(OPEN_SANS_ITALICrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS_ITALIC.).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
1446 &[
1447 FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#::newrust-analyzer cargo read-fonts 0.30.1 impl#[`FontRef<'a>`]new().(OPEN_SANSrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS.).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
1448 FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#::newrust-analyzer cargo read-fonts 0.30.1 impl#[`FontRef<'a>`]new().(OPEN_SANS_CONDENSEDrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS_CONDENSED.).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
1449 FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#::newrust-analyzer cargo read-fonts 0.30.1 impl#[`FontRef<'a>`]new().(OPEN_SANS_CONDENSED_ITALICrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS_CONDENSED_ITALIC.).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
1450 ],
1451 )
1452 .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().();
1453 let new_font = FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#::newrust-analyzer cargo read-fonts 0.30.1 impl#[`FontRef<'a>`]new().(&font_data).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().();
1454 let new_stat: Statrust-analyzer cargo write-fonts 0.39.0 tables/stat/Stat# = new_font.statrust-analyzer cargo read-fonts 0.30.1 table_provider/TableProvider#stat().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().().to_owned_tablerust-analyzer cargo write-fonts 0.39.0 from_obj/impl#[T][`ToOwnedTable<U>`]to_owned_table().();
1455 let name: Namerust-analyzer cargo write-fonts 0.39.0 tables/name/Name# = new_font.namerust-analyzer cargo read-fonts 0.30.1 table_provider/TableProvider#name().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().().to_owned_tablerust-analyzer cargo write-fonts 0.39.0 from_obj/impl#[T][`ToOwnedTable<U>`]to_owned_table().();
1456 // We expect three axes, wght, wdth, and ital
1457 assert_eqrust-analyzer cargo pretty_assertions 1.4.1 assert_eq!!(
1458 new_stat
1459 .design_axesrust-analyzer cargo write-fonts 0.39.0 tables/stat/Stat#design_axes.
1460 .iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().()
1461 .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|a| a.axis_tagrust-analyzer cargo write-fonts 0.39.0 tables/stat/AxisRecord#axis_tag.)
1462 .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<_>>(),
1463 vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![Tagrust-analyzer cargo font-types 0.9.0 tag/Tag#::newrust-analyzer cargo font-types 0.9.0 tag/impl#[Tag]new().(b"wght"), Tagrust-analyzer cargo font-types 0.9.0 tag/Tag#::newrust-analyzer cargo font-types 0.9.0 tag/impl#[Tag]new().(b"wdth"), Tagrust-analyzer cargo font-types 0.9.0 tag/Tag#::newrust-analyzer cargo font-types 0.9.0 tag/impl#[Tag]new().(b"ital")]
1464 );
1465 assert_eqrust-analyzer cargo pretty_assertions 1.4.1 assert_eq!!(
1466 dump_stat_valuesrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/dump_stat_values().(&new_stat, &name),
1467 vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
1468 valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/value().("wght", "Light", 300.0, Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1469 valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/value().("wght", "Regular", 400.0, Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(700.0)),
1470 valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/value().("wght", "Medium", 500.0, Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1471 valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/value().("wght", "SemiBold", 600.0, Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1472 valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/value().("wght", "Bold", 700.0, Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1473 valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/value().("wght", "ExtraBold", 800.0, Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1474 valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/value().("wdth", "Condensed", 75.0, Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1475 valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/value().("wdth", "SemiCondensed", 87.5, Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1476 valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/value().("wdth", "Normal", 100.0, Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1477 valuerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/value().("ital", "Italic", 1.0, Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
1478 ]
1479 )
1480 }
1481
1482 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
1483 fn test_build_filenamerust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/test_build_filename().() {
1484 let maven_pro = FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#::newrust-analyzer cargo read-fonts 0.30.1 impl#[`FontRef<'a>`]new().(MAVEN_PROrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/MAVEN_PRO.).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().();
1485 assert_eqrust-analyzer cargo pretty_assertions 1.4.1 assert_eq!!(build_filenamerust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/build_filename().(maven_pro, "ttf"), "MavenPro-Regular.ttf");
1486 let open_sans = FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#::newrust-analyzer cargo read-fonts 0.30.1 impl#[`FontRef<'a>`]new().(OPEN_SANSrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS.).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().();
1487 assert_eqrust-analyzer cargo pretty_assertions 1.4.1 assert_eq!!(build_filenamerust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/build_filename().(open_sans, "ttf"), "OpenSans[wdth,wght].ttf");
1488 let open_sans_italic = FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#::newrust-analyzer cargo read-fonts 0.30.1 impl#[`FontRef<'a>`]new().(OPEN_SANS_ITALICrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS_ITALIC.).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().();
1489 assert_eqrust-analyzer cargo pretty_assertions 1.4.1 assert_eq!!(
1490 build_filenamerust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/build_filename().(open_sans_italic, "ttf"),
1491 "OpenSans-Italic[wdth,wght].ttf"
1492 );
1493 let open_sans_condensed = FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#::newrust-analyzer cargo read-fonts 0.30.1 impl#[`FontRef<'a>`]new().(OPEN_SANS_CONDENSEDrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS_CONDENSED.).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().();
1494 assert_eqrust-analyzer cargo pretty_assertions 1.4.1 assert_eq!!(
1495 build_filenamerust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/build_filename().(open_sans_condensed, "ttf"),
1496 "OpenSansCondensed[wght].ttf"
1497 );
1498 let open_sans_condensed_italic = FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#::newrust-analyzer cargo read-fonts 0.30.1 impl#[`FontRef<'a>`]new().(OPEN_SANS_CONDENSED_ITALICrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/OPEN_SANS_CONDENSED_ITALIC.).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().();
1499 assert_eqrust-analyzer cargo pretty_assertions 1.4.1 assert_eq!!(
1500 build_filenamerust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/build_filename().(open_sans_condensed_italic, "ttf"),
1501 "OpenSansCondensed-Italic[wght].ttf"
1502 );
1503 let wonky = FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#::newrust-analyzer cargo read-fonts 0.30.1 impl#[`FontRef<'a>`]new().(WONKYrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/WONKY.).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().();
1504 assert_eqrust-analyzer cargo pretty_assertions 1.4.1 assert_eq!!(build_filenamerust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/build_filename().(wonky, "ttf"), "Wonky[wdth,wght].ttf");
1505 let playfair = FontRefrust-analyzer cargo read-fonts 0.30.1 FontRef#::newrust-analyzer cargo read-fonts 0.30.1 impl#[`FontRef<'a>`]new().(PLAYFAIRrust-analyzer cargo google-fonts-axisregistry 0.4.15 tests/PLAYFAIR.).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().();
1506 assert_eqrust-analyzer cargo pretty_assertions 1.4.1 assert_eq!!(
1507 build_filenamerust-analyzer cargo google-fonts-axisregistry 0.4.15 fontations_impl/build_filename().(playfair, "ttf"),
1508 "Playfair[opsz,wdth,wght].ttf"
1509 );
1510 }
1511 }