Skip to content
Merged
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
2 changes: 1 addition & 1 deletion src/providers/googleicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default defineFontProvider('googleicons', async (providerOptions: Googlei

async function getFontDetails(family: string, options: ResolveFontOptions<GoogleiconsFamilyOptions>) {
// Google Icons require sorted icon names, or we will see a 400 error
const iconNames = (options.options?.experimental?.glyphs ?? providerOptions.experimental?.glyphs?.[family])?.join('')
const iconNames = (options.options?.experimental?.glyphs ?? providerOptions.experimental?.glyphs?.[family])?.toSorted().join(',')

let css = ''

Expand Down
12 changes: 6 additions & 6 deletions test/providers/googleicons.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('googleicons', () => {
const unifont = await createUnifont([providers.googleicons({
experimental: {
glyphs: {
'Material Symbols Outlined': ['arrow_right', 'favorite', 'arrow_drop_down'],
'Material Symbols Outlined': ['bar_chart', 'bolt'],
},
},
})])
Expand All @@ -78,8 +78,8 @@ describe('googleicons', () => {
{
"format": "woff2",
"identifier": {
"kit": "",
"skey": "",
"kit": "kJEhBvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oFsLjBuVYLAPbrM4kWKE8mcwLO8rfPSFqKIVE",
"skey": "b8dc2088854b122f",
},
},
],
Expand All @@ -97,7 +97,7 @@ describe('googleicons', () => {
options: {
googleicons: {
experimental: {
glyphs: ['arrow_right', 'favorite', 'arrow_drop_down'],
glyphs: ['bar_chart', 'bolt'],
},
},
},
Expand All @@ -118,8 +118,8 @@ describe('googleicons', () => {
{
"format": "woff2",
"identifier": {
"kit": "",
"skey": "",
"kit": "kJEhBvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oFsLjBuVYLAPbrM4kWKE8mcwLO8rfPSFqKIVE",
"skey": "b8dc2088854b122f",
},
},
],
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"compilerOptions": {
"target": "es2022",
"target": "es2023",
"lib": [
"es2022"
"es2023"
],
"moduleDetection": "force",
"module": "preserve",
Expand Down
Loading