Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] Bump fontations crates #1134

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ rayon = "1.6"
icu_properties = "1.4"

# fontations etc
write-fonts = { version = "0.31.0", features = ["serde", "read"] }
skrifa = "0.25.0"
write-fonts = { version = "0.32.0", features = ["serde", "read"] }
skrifa = "0.26.0"
norad = "0.14.2"

# dev dependencies
Expand Down
6 changes: 4 additions & 2 deletions fea-rs/src/compile/tables/name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,15 @@ impl NameBuilder {

pub(crate) fn build(&self) -> Option<write_fonts::tables::name::Name> {
(!self.records.is_empty()).then(|| {
write_fonts::tables::name::Name::new(
let mut name = write_fonts::tables::name::Name::new(
self.records
.iter()
.filter(|(_, spec)| spec.is_implemented_in_fontations())
.map(|(id, spec)| spec.build(*id))
.collect(),
)
);
name.name_record.sort();
name
})
}
}
Expand Down
7 changes: 3 additions & 4 deletions fontbe/src/name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl Work<Context, AnyWorkId, Error> for NameWork {
fn exec(&self, context: &Context) -> Result<(), Error> {
let static_metadata = context.ir.static_metadata.get();

let name_records = static_metadata
let mut name_records = static_metadata
.names
.iter()
.map(|(key, value)| NameRecord {
Expand All @@ -43,10 +43,9 @@ impl Work<Context, AnyWorkId, Error> for NameWork {
string: OffsetMarker::new(value.clone()),
})
.collect::<Vec<_>>();
name_records.sort();

context
.name
.set(Name::new(name_records.into_iter().collect()));
context.name.set(Name::new(name_records));
Ok(())
}
}
Loading