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

Start to parse Fontra components #701

Merged
merged 2 commits into from
Feb 6, 2024
Merged

Start to parse Fontra components #701

merged 2 commits into from
Feb 6, 2024

Conversation

rsheeter
Copy link
Contributor

@rsheeter rsheeter commented Feb 3, 2024

Not yet turned into IR

Components require a better version of string to filename so that is added, fixes #688.

@rsheeter rsheeter changed the title [WIP] Add the ability to parse Fontra components Start to parse Fontra components Feb 5, 2024
@rsheeter rsheeter marked this pull request as ready for review February 5, 2024 19:38
Copy link
Member

@cmyr cmyr left a comment

Choose a reason for hiding this comment

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

A few rust idiom/api notes inline, but nothing blocking.

@@ -78,7 +180,7 @@ pub(crate) struct FontraSource {
#[serde(rename = "layerName")]
pub(crate) layer_name: String,
#[serde(default)]
pub(crate) location: HashMap<Tag, f64>,
pub(crate) location: HashMap<String, f64>,
Copy link
Member

Choose a reason for hiding this comment

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

if this String has any specific meaning (is it supposed to be a tag, or a human readable name, or what?) a comment would be useful.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it'll help if I newtype some of the name fields that are used as identifiers. HashMap<AxisName, f64>, much like the <Tag, f64> version. Aside: I wish it was the tag.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will do this in a followon

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.

Already had some comments attached to this so I dropped the ones Colin already mentioned.

@rsheeter rsheeter added this pull request to the merge queue Feb 6, 2024
Merged via the queue into main with commit ddc4715 Feb 6, 2024
10 checks passed
@rsheeter rsheeter deleted the g2 branch February 6, 2024 19:27

Choose a reason for hiding this comment

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

Thank

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

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.

Implement Fontra's glyph->filename algorithm
4 participants