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

impl From for FontStretch, FontStyle #813

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

dhardy
Copy link
Contributor

@dhardy dhardy commented Sep 2, 2024

Closes #808.

I added a CI test for usvg with all features since this was not present.

Note also:

  • fontdb::Weight could include From<u16>, but this is relatively unimportant
  • svgtypes::FontFamily could implement From<fontdb::FontFamily>; the reverse would need to be fontdb::FontFamily<'a>: From<&'a svgtypes::FontFamily> (omitted since this is a different repo)
  • fontdb::Query<'a> cannot implement From<usvg::Font> (or &'a usvg::Font) due to lifetime of the list of families.

@dhardy
Copy link
Contributor Author

dhardy commented Sep 2, 2024

Also note: the two enum conversions included here are the only bits I particularly wanted anyway.

Specifically, FontStretch and FontStyle
@RazrFalcon RazrFalcon merged commit e3f42ba into linebender:master Sep 2, 2024
2 of 3 checks passed
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.

Deduplicate fontdb types
2 participants