Skip to content

[fontless] support infering full range of variable weight #658

@hi-ogawa

Description

@hi-ogawa

🆒 Your use case

Currently the default is hard-coded as 400, but this is not ideal for many google fonts since the same font file can support wider range of font-weight if we infer full range.

🆕 The solution you'd like

Add support for this on unifont and enable it by default on fontaine for google font.
It appears unifont already has variable font detection https://github.com/unjs/unifont/blob/551259f1538c72184017cdd7d6dbc52958fef8ec/src/providers/google.ts#L83

Perhaps as experimental provider option such as:

google: {
  experimental: {
    inferVariableWeights: true,
  }
}

🔍 Alternatives you've considered

No response

ℹ️ Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    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