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] Improve builder API #550

Merged
merged 1 commit into from
Aug 1, 2023
Merged

[write-fonts] Improve builder API #550

merged 1 commit into from
Aug 1, 2023

Conversation

cmyr
Copy link
Member

@cmyr cmyr commented Aug 1, 2023

This makes a number of tweaks to the FontBuilder API, intended to improve ergonomics:

  • A 'copy_missing_tables' method was added to simplify the common step of bulk copying existing tables from a FontRef
  • The existing 'add_table' method was renamed 'add_raw',
  • and a new 'add_table' method was added that removes the need for the caller to manually compile the table and provide the appropriate tag to the builder.

Copy link
Member

@dfrg dfrg 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 great and the rmw example is pretty slick now, thanks! One nit inline but feel free to ignore.

write-fonts/src/font_builder.rs Outdated Show resolved Hide resolved
This makes a number of tweaks to the FontBuilder API, intended to
improve ergonomics:

- A 'copy_missing_tables' method was added to simplify the common step
  of bulk copying existing tables from a FontRef
- The existing 'add_table' method was renamed 'add_raw',
- and a new 'add_table' method was added that removes the need for the
  caller to manually compile the table and provide the appropriate tag
  to the builder.
@cmyr cmyr merged commit fbec90e into main Aug 1, 2023
7 checks passed
@cmyr cmyr deleted the fixup-builder-api branch August 1, 2023 19:51
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.

2 participants