Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions packages/font/src/google/font-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -5923,6 +5923,72 @@
"vietnamese"
]
},
"Google Sans Flex": {
"weights": [
"100",
"200",
"300",
"400",
"500",
"600",
"700",
"800",
"900",
"1000",
"variable"
],
"styles": ["normal"],
"axes": [
{
"tag": "GRAD",
"min": 0,
"max": 100,
"defaultValue": 0
},
{
"tag": "ROND",
"min": 0,
"max": 100,
"defaultValue": 0
},
{
"tag": "opsz",
"min": 6,
"max": 144,
"defaultValue": 18
},
{
"tag": "slnt",
"min": -10,
"max": 0,
"defaultValue": 0
},
{
"tag": "wdth",
"min": 25,
"max": 151,
"defaultValue": 100
},
{
"tag": "wght",
"min": 1,
"max": 1000,
"defaultValue": 400
}
],
"subsets": [
"canadian-aboriginal",
"cherokee",
"latin",
"latin-ext",
"math",
"nushu",
"symbols",
"syriac",
"tifinagh",
"vietnamese"
]
},
"Gorditas": {
"weights": ["400", "700"],
"styles": ["normal"],
Expand Down
47 changes: 47 additions & 0 deletions packages/font/src/google/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9058,6 +9058,53 @@ export declare function Google_Sans_Code<
| 'vietnamese'
>
}): T extends undefined ? NextFont : NextFontWithVariable
export declare function Google_Sans_Flex<
T extends CssVariable | undefined = undefined,
>(options?: {
weight?:
| '100'
| '200'
| '300'
| '400'
| '500'
| '600'
| '700'
| '800'
| '900'
| '1000'
| 'variable'
| Array<
| '100'
| '200'
| '300'
| '400'
| '500'
| '600'
| '700'
| '800'
| '900'
| '1000'
>
style?: 'normal' | Array<'normal'>
display?: Display
variable?: T
preload?: boolean
fallback?: string[]
adjustFontFallback?: boolean
subsets?: Array<
| 'canadian-aboriginal'
| 'cherokee'
| 'latin'
| 'latin-ext'
| 'math'
| 'nushu'
| 'symbols'
| 'syriac'
| 'tifinagh'
| 'vietnamese'
>
axes?: ('GRAD' | 'ROND' | 'opsz' | 'slnt' | 'wdth')[]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The axes type definition is missing the 'wght' axis that is defined in the font-data.json file (lines 5973-5977). This inconsistency will cause TypeScript type errors when users try to use the weight axis, even though it's available in the actual font data.

Fix:

axes?: ('GRAD' | 'ROND' | 'opsz' | 'slnt' | 'wdth' | 'wght')[]
Suggested change
axes?: ('GRAD' | 'ROND' | 'opsz' | 'slnt' | 'wdth')[]
axes?: ('GRAD' | 'ROND' | 'opsz' | 'slnt' | 'wdth' | 'wght')[]

Spotted by Graphite Agent

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

}): T extends undefined ? NextFont : NextFontWithVariable
export declare function Gorditas<
T extends CssVariable | undefined = undefined,
>(options: {
Expand Down
Loading