vdustr / font-splitter Goto Github PK
View Code? Open in Web Editor NEWSplit the big font file into small subsets
License: MIT License
Split the big font file into small subsets
License: MIT License
Thank you for making this tool. However, when using this tool to split HanaMin, the generated CSS seems to contain bad linefeeds that cause the browser failed to load the fonts, like the below snippet:
/**
* Font Splitter
* https://github.com/VdustR/font-splitter
*/
@font-face {
font-family: ่ฑๅๆๆA
;
font-style: normal;
font-weight: 400;
font-display: swap;
src: local('่ฑๅๆๆA Regular
'), local('HanaMinA
'), url(HanaMinA.Basic-Latin.woff2) format('woff2');
unicode-range: U+0, U+8-9, U+d, U+1d, U+20-7e;
}
Thank you for making this tool. But now this tool does not work correctly, it seems to be related to the update of the es-abstract package, I can't be sure.
Calculating...
C:\Users\Crimone\AppData\Roaming\npm\node_modules\font-splitter\node_modules\es-abstract\5\CheckObjectCoercible.js:11
throw new $TypeError(optMessage || ('Cannot call method on ' + value));
^
TypeError: Cannot call method on null
at Object.CheckObjectCoercible [as RequireObjectCoercible] (C:\Users\Crimone\AppData\Roaming\npm\node_modules\font-splitter\node_modules\es-abstract\5\CheckObjectCoercible.js:11:9)
at matchAll (C:\Users\Crimone\AppData\Roaming\npm\node_modules\font-splitter\node_modules\string.prototype.matchall\implementation.js:24:13)
at getFontName (C:\Users\Crimone\AppData\Roaming\npm\node_modules\font-splitter\src\app.js:25:10)
at genSubsets (C:\Users\Crimone\AppData\Roaming\npm\node_modules\font-splitter\src\app.js:203:32)
at Object.<anonymous> (C:\Users\Crimone\AppData\Roaming\npm\node_modules\font-splitter\bin\font-splitter:59:1)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
Repo: font-splitter
The maximum Unicode range in the generated CSS file is only U+5e00-61bf. However, the original font should cover many things other than this, like Halfwidth and Fullwidth Forms, CJK Extension B, C, D, E and F.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.