Skip to content

Latest commit

 

History

History
46 lines (29 loc) · 1.66 KB

README.md

File metadata and controls

46 lines (29 loc) · 1.66 KB

google-like-subset

Font subset generator based on Korean Google Fonts.

⚠️ DISCLAMER: Made this with very ✕ ∞ exhausted mental state, so the codes are not in a good quailty.

Why

Korean fonts are very heavy because there are many default glyphs.
Minimum is 2,350 characters, it could be more if the font supports Korean Completed or CJK Compatible.

So, Google Fonts runs Machine Learning to minimize and optimize korean fonts for the better online webfont experience.

Base concept of Google Fonts:

  • Split fonts it with many-small sizes, combining in client-side
  • Use font-display: swap to show only the glyph is needed (if browser supports)
  • Split font file into very small subsets

It could be useful for other korean fonts, so made this.

Before install

google-like-subset requires Chromium to run. If you're using an arm64 architecture, please install Chromium manually before running ./install.sh.

$ sudo apt install chromium  # ubuntu
$ brew install chromium --no-quarantine  # macOS

How to start

Clone this repository into your local and make three folders:

  • subset - where created subset files are stored.
  • charset - where Google font parsing results are stored.
  • base - store font file you want to make subset.

after store your font file at base folder, open config.ts.

  • BaseGoogleFont - Korean Google Font that you want to parse unicode sets.
  • FontData - the data of font that you're making as a subset.
  • Paths - folders... only change base with your stored file name.

Run ./install.sh ... and just run yarn start.