Skip to content

Commit

Permalink
chore: mark variableAxis experimental
Browse files Browse the repository at this point in the history
  • Loading branch information
qwerzl committed Oct 6, 2024
1 parent cbcab68 commit d40c01a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/providers/google.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ export default defineFontProvider('google', async (_options, ctx) => {
const resolvedAxes = []
let resolvedVariants: string[] = []

for (const axis of ['wght', 'ital', ...Object.keys(options.variableAxis ?? {})].sort(googleFlavoredSorting)) {
for (const axis of ['wght', 'ital', ...Object.keys(options.experimental?.variableAxis ?? {})].sort(googleFlavoredSorting)) {
const axisValue = ({
wght: weights,
ital: styles,
})[axis] ?? options.variableAxis![axis]!
})[axis] ?? options.experimental!.variableAxis![axis]!

if (resolvedVariants.length === 0) {
resolvedVariants = axisValue
Expand Down
4 changes: 3 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ export interface ResolveFontOptions {
subsets: string[]
fallbacks?: string[]
// Variable axis
variableAxis?: { [key: VariableAxis]: string[] }
experimental?: {
variableAxis?: { [key: VariableAxis]: string[] }
}
}

export interface RemoteFontSource {
Expand Down

0 comments on commit d40c01a

Please sign in to comment.