Skip to content

Better API for family options specific to a given provider #183

@florian-lefebvre

Description

@florian-lefebvre

🆒 Your use case

Some providers support specific options at the family level. Currently those options need to be passed at the provider level:

google({
    experimental: {
        variableAxis: { DynaPuff: { wdth: [['75', '100']] } },
    },
})

🆕 The solution you'd like

It would be better to add the ability to have options at the family level. For example:

await unifont.resolveFont('Poppins', {
  weight: [400,500],
  options: {
     wdth: [['75', '100']]
  } satisfies GoogleFamilyOptions
})

🔍 Alternatives you've considered

No response

ℹ️ Additional info

I'd be happy to send a PR for this

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions