diff --git a/font/huangcao.ttf b/font/huangcao.ttf deleted file mode 100644 index 8f08e021d..000000000 Binary files a/font/huangcao.ttf and /dev/null differ diff --git a/font/huangcao.woff2 b/font/huangcao.woff2 new file mode 100644 index 000000000..18d1ed987 Binary files /dev/null and b/font/huangcao.woff2 differ diff --git a/font/shousha.ttf b/font/shousha.ttf deleted file mode 100644 index fe8ea1b0a..000000000 Binary files a/font/shousha.ttf and /dev/null differ diff --git a/font/shousha.woff2 b/font/shousha.woff2 new file mode 100644 index 000000000..018f25661 Binary files /dev/null and b/font/shousha.woff2 differ diff --git a/font/suits.ttf b/font/suits.ttf deleted file mode 100644 index b87937b60..000000000 Binary files a/font/suits.ttf and /dev/null differ diff --git a/font/suits.woff2 b/font/suits.woff2 new file mode 100644 index 000000000..f1097cdf5 Binary files /dev/null and b/font/suits.woff2 differ diff --git a/font/xiaozhuan.ttf b/font/xiaozhuan.ttf deleted file mode 100644 index 33eb29f71..000000000 Binary files a/font/xiaozhuan.ttf and /dev/null differ diff --git a/font/xiaozhuan.woff2 b/font/xiaozhuan.woff2 new file mode 100644 index 000000000..a7b92a61a Binary files /dev/null and b/font/xiaozhuan.woff2 differ diff --git a/font/xingkai.woff2 b/font/xingkai.woff2 new file mode 100644 index 000000000..1120aac6a Binary files /dev/null and b/font/xingkai.woff2 differ diff --git a/font/xinwei.ttf b/font/xinwei.ttf deleted file mode 100644 index 013ca4b25..000000000 Binary files a/font/xinwei.ttf and /dev/null differ diff --git a/font/xingkai.ttf b/font/xinwei.woff2 similarity index 50% rename from font/xingkai.ttf rename to font/xinwei.woff2 index 6ab8be042..51e1122db 100644 Binary files a/font/xingkai.ttf and b/font/xinwei.woff2 differ diff --git a/font/yuanli.ttf b/font/yuanli.ttf deleted file mode 100644 index bca33e79e..000000000 Binary files a/font/yuanli.ttf and /dev/null differ diff --git a/font/yuanli.woff2 b/font/yuanli.woff2 new file mode 100644 index 000000000..70e451a2e Binary files /dev/null and b/font/yuanli.woff2 differ diff --git a/game/game.js b/game/game.js index f1969f2a4..5864e9a3a 100644 --- a/game/game.js +++ b/game/game.js @@ -7813,10 +7813,10 @@ appearenceConfig.identity_font.item[value]=font; appearenceConfig.cardtext_font.item[value]=font; appearenceConfig.global_font.item[value]=font; - fontSheet.insertRule(`@font-face {font-family: '${value}'; src: local('${font}'), url('${lib.assetURL}font/${value}.ttf');}`,0); - if(suitsFont) fontSheet.insertRule(`@font-face {font-family: '${value}'; src: local('${font}'), url('${lib.assetURL}font/suits.ttf');}`,0); + fontSheet.insertRule(`@font-face {font-family: '${value}'; src: local('${font}'), url('${lib.assetURL}font/${value}.woff2');}`,0); + if(suitsFont) fontSheet.insertRule(`@font-face {font-family: '${value}'; src: local('${font}'), url('${lib.assetURL}font/suits.woff2');}`,0); }); - if(suitsFont) fontSheet.insertRule(`@font-face {font-family: 'Suits'; src: local('Noname Suit'), url('${lib.assetURL}font/suits.ttf');}`,0); + if(suitsFont) fontSheet.insertRule(`@font-face {font-family: 'Suits'; src: local('Noname Suit'), url('${lib.assetURL}font/suits.woff2');}`,0); appearenceConfig.cardtext_font.item.default='默认'; appearenceConfig.global_font.item.default='默认'; } @@ -40148,11 +40148,11 @@ zip.load(data); var images=[],audios=[],fonts=[],directories={},directorylist=[]; for(var i in zip.files){ - var ext=i.slice(i.lastIndexOf('.')+1); + var ext=i.slice(i.lastIndexOf('.')+1).toLowerCase(); if(i.indexOf('audio/')==0&&(ext=='mp3'||ext=='ogg')){ audios.push(i); } - else if(i.indexOf('font/')==0&&ext=='ttf'){ + else if(i.indexOf('font/')==0&&ext=='woff2'){ fonts.push(i); } else if(i.indexOf('image/')==0&&(ext=='jpg'||ext=='png')){