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

[write-fonts] Post builder fixups #576

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

[write-fonts] Post builder fixups #576

wants to merge 1 commit into from

Conversation

cmyr
Copy link
Member

@cmyr cmyr commented Aug 15, 2023

was looking for a little task while waiting for something else to finish and saw #548.

This closes #548, although not exactly as intended.

This is also a breaking change, so I'd prefer to hold it back until we have some more breaking stuff and we can merge it all together.


This makes it so that we compute the num_glyphs value, and provide defaults for the legacy 'min_mem_XXX' fields.

It also replaces the new_v2 method with methods for adding string data to an existing table. I couldn't decide on what the actual API should be here, but I didn't like that new_v2 added defaults for the standard fields.

This makes it so that we compute the num_glyphs value, and provide
defaults for the legacy 'min_mem_XXX' fields.

It also replaces the `new_v2` method with methods for adding string data
to an existing table. I couldn't decide on what the actual API should be
here, but I didn't like that `new_v2` added defaults for the standard
fields.
Copy link
Member

@anthrotype anthrotype left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks better than before. We should also make sure that if the caller does not set glyph names, we default to post version 3.0, not 1.0 (which is legacy mac thing)

@cmyr
Copy link
Member Author

cmyr commented Aug 16, 2023

ah okay good catch!

@cmyr
Copy link
Member Author

cmyr commented Aug 16, 2023

That's actually an interesting complication for codegen, this is the first time where we will have a lower version of a table (2.0) that has more fields than a higher version (3.0). We make a bunch of assumptions about fields only being added with versions, so I'll have to think about this some.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

write-fonts: 'post' table's version should be computed
2 participants