Skip to content

Move Setting, Weight, Stretch, and Style types to font-types#1660

Open
nicoburns wants to merge 2 commits intogooglefonts:mainfrom
nicoburns:move-types-to-font-types
Open

Move Setting, Weight, Stretch, and Style types to font-types#1660
nicoburns wants to merge 2 commits intogooglefonts:mainfrom
nicoburns:move-types-to-font-types

Conversation

@nicoburns
Copy link
Contributor

@nicoburns nicoburns commented Sep 15, 2025

Once font-types hits 1.0, these will be super-useful as interop types for the Rust crates ecosystem.

We may also wish to consider some renames:

  • Weight -> FontWeight
  • Style -> FontStyle
  • Stretch -> FontStretch (or possibly FontWidth - matching CSS)

@rsheeter
Copy link
Collaborator

Seems reasonable at a glance, ty for sending. I will ping to see if anyone forsees problems.

@cmyr
Copy link
Member

cmyr commented Sep 16, 2025

@nicoburns do you have a concrete use case/motivation for these changes? In general we want to keep changes in font-types minimal (specifically because it uses some unsafe, which means we potentially have to go through security review when making changes) and we'd be wary of scope creep (like wanting more CSS-style attributes.)

Put another way, would moving this API to font-types be useful to you, even if we were to never significantly add to the existing API?

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.

3 participants