File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ const options = {
5454 resolvePath : (id ) => ' file:///path/to/public/dir' + id,
5555 // overrideName: (originalName) => `${name} override`
5656 // sourcemap: false
57- // skipFontFaceGeneration: (fontFamily ) => fontFamily === 'Roboto'
57+ // skipFontFaceGeneration: (fallbackName ) => fallbackName === 'Roboto override '
5858}
5959
6060// Vite
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export interface FontaineTransformOptions {
1717 css ?: { value ?: string }
1818 fallbacks : string [ ]
1919 resolvePath ?: ( path : string ) => string | URL
20- skipFontFaceGeneration ?: ( name : string ) => boolean
20+ skipFontFaceGeneration ?: ( fallbackName : string ) => boolean
2121 /** this should produce an unquoted font family name */
2222 fallbackName ?: ( name : string ) => string
2323 /** @deprecated use fallbackName */
@@ -66,7 +66,7 @@ export const FontaineTransform = createUnplugin(
6666 for ( const { family, source } of parseFontFace ( matchContent ) ) {
6767 if ( ! family ) continue
6868 if ( ! supportedExtensions . some ( e => source ?. endsWith ( e ) ) ) continue
69- if ( skipFontFaceGeneration ( family ) ) continue
69+ if ( skipFontFaceGeneration ( fallbackName ( family ) ) ) continue
7070
7171 const metrics =
7272 ( await getMetricsForFamily ( family ) ) ||
You can’t perform that action at this time.
0 commit comments