-
Notifications
You must be signed in to change notification settings - Fork 17
Build simple glyphs (static glyf, 2 of 3) #131
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
Conversation
4b10dcd to
b50438a
Compare
cmyr
left a comment
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.
I feel my brain has largely departed me for the day, but nothing here jumps out as egregious 👍
|
@anthrotype although now merged I would still love your feedback on this |
anthrotype
left a comment
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.
LGTM!
| .collect(); | ||
| new_glyphs.sort(); | ||
| trace!( | ||
| "Added {} additional glyphs: {new_glyphs:?}", |
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.
why just "added {} additional glyphs"? It is not conceivable that glyphs are also removed when current != new glyph_order?
| fn add_glyph_be_job(workload: &mut Workload, fe_root: &FeContext, glyph_name: GlyphName) { | ||
| let glyph_ir = fe_root.get_glyph_ir(&glyph_name); | ||
|
|
||
| // To build a glyph we need it's components, plus static metadata |
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.
typo
+ we need it's components
- we need its components| let successes = self.read_completions(&recv, RecvType::Blocking)?; | ||
| successes | ||
| .into_iter() | ||
| .for_each(|s| self.handle_success(&fe_root, s)); |
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.
noob question: what's the advantage of using iterator+for_each closure over an explicit for loop here?
Is it just taste? I should probably get used to it ..
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.
I actually agree with you, I think this is confusing, and maybe doing too much.
| .collect(); | ||
|
|
||
| // At long last, actually convert something to quadratic | ||
| // TODO what should we pass for accuracy |
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.
python cu2qu defaults to a relative max_error of 1/1000th of the font's UPEM; e.g. for a usual font with head.unitsPerEm=1000, the absolute max_error is 1 font unit.
Split out from #120 to try to make review more tractable.
Compile simple static glyphs. cu2qu in a manner that should work for variations.
Blocked on googlefonts/fontations#258, but I don't expect that to appreciably change the logic so I believe this is reviewable. Edit: fixed.