-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add initial implementation of meta
compilation
#1136
base: main
Are you sure you want to change the base?
Conversation
This is sufficient to resolve a few ttx table diffs on fontc_crater, but needs refinement.
This is heavily WIP; it needs a tidy and is untested, and should be considered an initial draft only.
(rebased on |
.collect(), | ||
)) | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it should be possible to unindent, e.g.
let static_metadata = context.ir.static_metadata.get();
let records = &static_metadata.misc.meta;
// Guard clause: nop if there are no meta records
if records.is_empty() {
return Ok(());
}
context.meta.set(Meta::new(...));
@@ -130,6 +134,8 @@ impl GlyphsIrSource { | |||
unicode_range_bits: font.unicode_range_bits.clone(), | |||
codepage_range_bits: font.codepage_range_bits.clone(), | |||
panose: font.panose.clone(), | |||
// TODO: Is this correct? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks right at a glance
@@ -182,6 +188,8 @@ impl GlyphsIrSource { | |||
unicode_range_bits: None, | |||
codepage_range_bits: None, | |||
panose: None, | |||
// TODO: Is this correct? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks right, I don't think meta can change global metrics
// TODO: This diverges from glyphsLib, which must convert a list of | ||
// records into UFO's intermediate dict representation; is this | ||
// actually an improvement, or a breaking change? What does Glyphs | ||
// do? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems like an @anthrotype question
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks promising!
Hello!
This PR begins implementation of
meta
table compilation for the Glyphs and UFO formats. This is a larger end-to-end implementation than my previous PRs, and so I am making an early draft to work on it publicly to make sure that it can be shaped from the beginning, and that it stays on track; all feedback and contributions welcome :)Implemented
meta
table for the top few fontc_crater reportsTODO
StateSet
construction inglyphs2fontir
expect(...)
, no type conversion clutter, etc)main
(most of these are also flagged as inline TODOs, to be resolved before merge)
Will implement #1113
Note: this is a personal contribution independent of my employer, and so I've submitted from a fork under my personal profile and email to make this distinction