Add initial implementation of meta
#1237
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello!
This PR adds adds read and write for the
meta
table, including a codegen definition, some manual parts to handle the offset slices, and plumbing to surface the table withinread-fonts
andwrite-fonts
.This is my first contribution, so where possible I've borrowed liberally from the implementation of other tables, especially
name
(for its handling of offset prescribed-length data).This is an early implementation, and has not had the manual and automated testing it will require yet. Additionally, there is an implementation of the
FontWrite
trait for&[u8]
that may be redundant.As such, I'm making the PR as a draft for now, until I can gather feedback and dig a bit deeper :)
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