Skip to content

Compile Fontra fonts - #2068

Draft
khaledhosny wants to merge 15 commits into
googlefonts:mainfrom
khaledhosny:fontra-compile
Draft

Compile Fontra fonts#2068
khaledhosny wants to merge 15 commits into
googlefonts:mainfrom
khaledhosny:fontra-compile

Conversation

@khaledhosny

Copy link
Copy Markdown
Contributor

(Should be applied after #2064)

Rework fontra.rs to mirror current Fontra classes.py as much as
possible.

This is a rather big change, but Fontra changed quite a bit
since this code was initially written, and we can now also parse the
whole file format more or less (the .csv files will be handled in later
commits).

I also drop the “Fontra” prefix from the type names as it felt
redundant, and other backends does not have such prefixes.

serde(rename_all = "camelCase") is now used to avoid having to manually
rename struct members (except for the few cases where camelCase would
not give the name Fontra uses).

The existing test files were also updated to reflect the current file
format.
In preparation for updating and integrating it into Font.
Update parsing glyph-info.csv to match current Fontra and make it
populate Font::glyph_map and Font::glyph_infos.  Don’t read glyphs files
for glyph map, since it can be built from glyph-info.csv already.

Update StaticMetadataWork to use Font::glyph_map and Font::glyph_infos.
Font files copied from Fontra repository unchanged.
Update 2glyphs.fontra to have a default source so it doesn’t fail to
load.
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.

1 participant