-
Notifications
You must be signed in to change notification settings - Fork 37
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
Sync with 4.1 #98
Sync with 4.1 #98
Conversation
LaurenzV
commented
Feb 16, 2024
Status | Commit message | HB | Comments |
---|---|---|---|
🟢 | [USE] Treat visible viramas like dependent vowels | Link | |
⚪️ | Make load_num_glyphs_from_loca conditional on HB_NO_BORING_EXPANSION | Link | |
⚪️ | [baseline] Use ot-metrics fallback API | Link | |
⚪️ | [metrics] Simplify x-height fallback | Link | |
⚪️ | [layout] Whitespace | Link | |
⚪️ | [baseline] Fix HB_NO_METRICS build | Link | |
⚪️ | [subset] bug fix in prune_langsys | Link | |
🟢 | restores unintended addition in 43be5ba | Link | |
⚪️ | [coretext] Remove dead code | Link | |
⚪️ | Add log base 2 versions of constants. | Link | |
⚪️ | Use bit shifting instead of multiplying and dividing. | Link | |
⚪️ | Fix typo. | Link | |
⚪️ | Add option to insert a sorted arrays of values to sets. | Link | |
⚪️ | Remove null checks. | Link | |
⚪️ | Move fn | Link | |
⚪️ | [set] Fix-up previous commits | Link | |
🟢 | [indic] Clear syllables before presentation features | Link | |
🟢 | [indic] Test clearing syllables earlier | Link | |
⚪️ | [set] Fix documentation | Link | |
⚪️ | [buffer] Fix out-buffer under memory-alloc failure | Link | |
⚪️ | [cmap] In collect_unicodes() of format 12/13 | Link | |
🟢 | [ot-font] Only use vmtx side-bearing if table exists | Link | ported and test cases pass, but maybe check if there is a better way to do it |
⚪️ | [hmtx] Change default advance for horizontal direction to upem/2 again | Link | |
🟢 | [ot-font] Use ascent+descent for fallback vertical advance | Link | same |
🟢 | [ot-font] Vertically center glyph in vertical writing fallback | Link | same |
🟢 | Update tests for recent changes | Link | |
⚪️ | Merge pull request #3497 from harfbuzz/vertical-origin | Link | |
⚪️ | [buffer] Whitespace | Link | |
⚪️ | Remove old TODO file | Link | |
⚪️ | 4.1 | Link |
That one was a bit of a struggle once again due to diverging code bases. :( I tried my best, and the new test cases pass for now. But once you're done with what you want to do I will try to look into whether we can make that part of the codebase closer to what harfbuzz actually does. But for now it should be fine, and you can keep working on the [reorg] commits that are up next, if you feel like doing so. |
Also harfbuzz/ttf-parser#143 needs to be merged first, though. |
Actually, I don't think we have to change to returning a boolean for |
Can you point me to the Otherwise looks good. |
It wasn't part of this change, it already existed but seems like it wasn't ported (otherwise the tests wouldn't have failed): That's the one for CFF1 I think: |
Hmm... then your |
So should I do this: if self.ttfp_face.tables().glyf.is_some() {
if self.ttfp_face.glyph_bounding_box(glyph).is_none() {
// Empty glyph; zero extents.
return true;
}
}
let Some(bbox) = self.ttfp_face.glyph_bounding_box(glyph) else {
return false;
}; or just: let Some(bbox) = self.ttfp_face.glyph_bounding_box(glyph) else {
return true;
}; |
Hard to say. I'm not really sure what harfbuzz is doing here. A concept of an "empty" glyph is very abstract in TrueType.
To mimic harfbuzz here we need to heavily update ttf-parser API, which I would rather do later. let bbox = self.ttfp_face.glyph_bounding_box(glyph);
if self.ttfp_face.tables().glyf.is_some() && bbox.is_none() {
// Empty glyph; zero extents.
return true;
}
let Some(bbox) = bbox else {
return false;
}; Hopefully this would be enough for now. |
Done. |
Yeah it's tricky... Maybe we should somehow change ttf-parser to also allow access the low-level stuff, or maybe it should be a separate crate and ttf-parser is then just an abstraction layer on top of it. Not sure... But one step at a time. |
Yep, a lot of ideas, not a lot of time. |