Skip to content

Commit

Permalink
Fix types default to prefer woff2 over woff
Browse files Browse the repository at this point in the history
Signed-off-by: Anders Kaseorg <[email protected]>
  • Loading branch information
andersk committed Nov 29, 2023
1 parent 917b7f5 commit 9b55d1c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ module.exports = {
'fontName': 'myfonticons',
'classPrefix': 'myfonticon-',
'baseSelector': '.myfonticon',
'types': ['eot', 'woff', 'woff2', 'ttf', 'svg'],
'types': ['eot', 'woff2', 'woff', 'ttf', 'svg'],
'fileName': 'app.[fontname].[hash].[ext]'
};
```
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ module.exports = function (content) {
fontConfig.files = filesAndDeps.files;

// With everything set up, let's make an ACTUAL config.
var formats = fontConfig.types || ['eot', 'woff', 'woff2', 'ttf', 'svg'];
var formats = fontConfig.types || ['eot', 'woff2', 'woff', 'ttf', 'svg'];
if (formats.constructor !== Array) {
formats = [formats];
}
Expand Down
2 changes: 1 addition & 1 deletion test-embed/myfont.font.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"fontName": "myfonticons",
"classPrefix": "myfonticon-",
"baseSelector": ".myfonticon",
"types": ["eot", "woff", "woff2", "ttf", "svg"],
"types": ["eot", "woff2", "woff", "ttf", "svg"],
"fixedWidth": true,
"embed": true,
"fileName": "app.[fontname].[chunkhash].[ext]"
Expand Down
2 changes: 1 addition & 1 deletion test/myfont.font.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = {
'fontName': 'myfonticons',
'classPrefix': 'myfonticon-',
'baseSelector': '.myfonticon',
'types': ['eot', 'woff', 'woff2', 'ttf', 'svg'],
'types': ['eot', 'woff2', 'woff', 'ttf', 'svg'],
'fixedWidth': true,
'fileName': 'app.[fontname].[chunkhash].[ext]'
};

0 comments on commit 9b55d1c

Please sign in to comment.