$ curl -LO https://github.com/yuru7/HackGen/releases/download/v2.9.0/HackGen_NF_v2.9.0.zip
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 23.0M 100 23.0M 0 0 8693k 0 0:00:02 0:00:02 --:--:-- 11.2M
$ curl -LO https://github.com/yuru7/HackGen/releases/download/v2.9.0/HackGen_v2.9.0.zip
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 38.5M 100 38.5M 0 0 9460k 0 0:00:04 0:00:04 --:--:-- 11.3M
$ unzip HackGen_v2.9.0.zip
Archive: HackGen_v2.9.0.zip
creating: HackGen_v2.9.0/
inflating: HackGen_v2.9.0/HackGen-Bold.ttf
inflating: HackGen_v2.9.0/HackGen-Regular.ttf
inflating: HackGen_v2.9.0/HackGen35-Bold.ttf
inflating: HackGen_v2.9.0/HackGen35-Regular.ttf
inflating: HackGen_v2.9.0/HackGen35Console-Bold.ttf
inflating: HackGen_v2.9.0/HackGen35Console-Regular.ttf
inflating: HackGen_v2.9.0/HackGenConsole-Bold.ttf
inflating: HackGen_v2.9.0/HackGenConsole-Regular.ttf
$ unzip HackGen_NF_v2.9.0.zip
Archive: HackGen_NF_v2.9.0.zip
creating: HackGen_NF_v2.9.0/
inflating: HackGen_NF_v2.9.0/HackGen35ConsoleNF-Bold.ttf
inflating: HackGen_NF_v2.9.0/HackGen35ConsoleNF-Regular.ttf
inflating: HackGen_NF_v2.9.0/HackGenConsoleNF-Bold.ttf
inflating: HackGen_NF_v2.9.0/HackGenConsoleNF-Regular.ttf
==== TrueType(.ttf) から Web Open Font Format(.woff と .woff2) へ変換🤤 ====
$ cd HackGen_v2.9.0
$ ls *.ttf | xargs -i sh -c 'sfnt2woff {} && woff2_compress {}'
Processing HackGen-Bold.ttf => HackGen-Bold.woff2
Compressed 9099366 to 3604694.
Processing HackGen-Regular.ttf => HackGen-Regular.woff2
Compressed 8646957 to 3431083.
Processing HackGen35-Bold.ttf => HackGen35-Bold.woff2
Compressed 9099743 to 3605098.
Processing HackGen35-Regular.ttf => HackGen35-Regular.woff2
Compressed 8647249 to 3431110.
Processing HackGen35Console-Bold.ttf => HackGen35Console-Bold.woff2
Compressed 9119537 to 3613699.
Processing HackGen35Console-Regular.ttf => HackGen35Console-Regular.woff2
Compressed 8671988 to 3441818.
Processing HackGenConsole-Bold.ttf => HackGenConsole-Bold.woff2
Compressed 9119552 to 3614099.
Processing HackGenConsole-Regular.ttf => HackGenConsole-Regular.woff2
Compressed 8669945 to 3443688.
$ ll
合計 153772
-rw-r--r-- 1 tomoyan tomoyan 11239764 5月 3 17:51 HackGen-Bold.ttf
-rw-r--r-- 1 tomoyan tomoyan 5243656 9月 23 10:52 HackGen-Bold.woff
-rw-r--r-- 1 tomoyan tomoyan 3604800 9月 23 10:52 HackGen-Bold.woff2
-rw-r--r-- 1 tomoyan tomoyan 10695124 5月 3 17:51 HackGen-Regular.ttf
-rw-r--r-- 1 tomoyan tomoyan 5106732 9月 23 10:52 HackGen-Regular.woff
-rw-r--r-- 1 tomoyan tomoyan 3431188 9月 23 10:53 HackGen-Regular.woff2
-rw-r--r-- 1 tomoyan tomoyan 11239408 5月 3 17:51 HackGen35-Bold.ttf
-rw-r--r-- 1 tomoyan tomoyan 5243108 9月 23 10:53 HackGen35-Bold.woff
-rw-r--r-- 1 tomoyan tomoyan 3605204 9月 23 10:53 HackGen35-Bold.woff2
-rw-r--r-- 1 tomoyan tomoyan 10694628 5月 3 17:51 HackGen35-Regular.ttf
-rw-r--r-- 1 tomoyan tomoyan 5105320 9月 23 10:53 HackGen35-Regular.woff
-rw-r--r-- 1 tomoyan tomoyan 3431216 9月 23 10:54 HackGen35-Regular.woff2
-rw-r--r-- 1 tomoyan tomoyan 11250760 5月 3 17:51 HackGen35Console-Bold.ttf
-rw-r--r-- 1 tomoyan tomoyan 5250220 9月 23 10:54 HackGen35Console-Bold.woff
-rw-r--r-- 1 tomoyan tomoyan 3613804 9月 23 10:54 HackGen35Console-Bold.woff2
-rw-r--r-- 1 tomoyan tomoyan 10711388 5月 3 17:51 HackGen35Console-Regular.ttf
-rw-r--r-- 1 tomoyan tomoyan 5113104 9月 23 10:54 HackGen35Console-Regular.woff
-rw-r--r-- 1 tomoyan tomoyan 3441924 9月 23 10:55 HackGen35Console-Regular.woff2
-rw-r--r-- 1 tomoyan tomoyan 11251872 5月 3 17:51 HackGenConsole-Bold.ttf
-rw-r--r-- 1 tomoyan tomoyan 5252108 9月 23 10:55 HackGenConsole-Bold.woff
-rw-r--r-- 1 tomoyan tomoyan 3614204 9月 23 10:55 HackGenConsole-Bold.woff2
-rw-r--r-- 1 tomoyan tomoyan 10710336 5月 3 17:51 HackGenConsole-Regular.ttf
-rw-r--r-- 1 tomoyan tomoyan 5115612 9月 23 10:55 HackGenConsole-Regular.woff
-rw-r--r-- 1 tomoyan tomoyan 3443796 9月 23 10:56 HackGenConsole-Regular.woff2
$ cd ../HackGen_NF_v2.9.0
$ ls *.ttf | xargs -i sh -c 'sfnt2woff {} && woff2_compress {}'
Processing HackGen35ConsoleNF-Bold.ttf => HackGen35ConsoleNF-Bold.woff2
Compressed 10551428 to 4365109.
Processing HackGen35ConsoleNF-Regular.ttf => HackGen35ConsoleNF-Regular.woff2
Compressed 10103895 to 4187458.
Processing HackGenConsoleNF-Bold.ttf => HackGenConsoleNF-Bold.woff2
Compressed 10551379 to 4366483.
Processing HackGenConsoleNF-Regular.ttf => HackGenConsoleNF-Regular.woff2
Compressed 10101788 to 4189298.
$ ll
合計 90800
-rw-r--r-- 1 tomoyan tomoyan 13060044 5月 3 17:51 HackGen35ConsoleNF-Bold.ttf
-rw-r--r-- 1 tomoyan tomoyan 6238424 9月 23 11:01 HackGen35ConsoleNF-Bold.woff
-rw-r--r-- 1 tomoyan tomoyan 4365216 9月 23 11:01 HackGen35ConsoleNF-Bold.woff2
-rw-r--r-- 1 tomoyan tomoyan 12520684 5月 3 17:51 HackGen35ConsoleNF-Regular.ttf
-rw-r--r-- 1 tomoyan tomoyan 6101096 9月 23 11:01 HackGen35ConsoleNF-Regular.woff
-rw-r--r-- 1 tomoyan tomoyan 4187564 9月 23 11:02 HackGen35ConsoleNF-Regular.woff2
-rw-r--r-- 1 tomoyan tomoyan 13061184 5月 3 17:51 HackGenConsoleNF-Bold.ttf
-rw-r--r-- 1 tomoyan tomoyan 6240728 9月 23 11:02 HackGenConsoleNF-Bold.woff
-rw-r--r-- 1 tomoyan tomoyan 4366588 9月 23 11:02 HackGenConsoleNF-Bold.woff2
-rw-r--r-- 1 tomoyan tomoyan 12519656 5月 3 17:51 HackGenConsoleNF-Regular.ttf
-rw-r--r-- 1 tomoyan tomoyan 6104016 9月 23 11:02 HackGenConsoleNF-Regular.woff
-rw-r--r-- 1 tomoyan tomoyan 4189404 9月 23 11:03 HackGenConsoleNF-Regular.woff2
===== WOFFConverter (Windows) =====
{{:web:woff_converter_001.png?80|WOFFConverter Icon}}\\
[[https://opentype.jp/woffconv.htm|WOFFコンバータ]] (武蔵システム)\\
{{:web:woff_converter_002.png?400|WOFFConverter 002}}\\
===== 参考文献 =====
[[https://fonts.google.com|Google Fonts]]\\
[[https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/webfont-optimization?hl=ja|ウェブフォントの最適化 | Web Fundamentals | Google Developers]]\\
[[https://01earth.jp/web-create/coding/web-font/|自社サーバーにフォントをアップロードして、Webフォントを使用する方法|株式会社ゼロワンアース]]\\
[[https://en.wikipedia.org/wiki/Web_Open_Font_Format|Web Open Font Format - Wikipedia]]\\
[[https://developer.mozilla.org/ja/docs/Web/Guide/WOFF|WOFF (Web Open Font Format) - 開発者ガイド | MDN]]\\
[[https://www.willgate.co.jp/promonista/page-speed/|ページ表示速度の計測・改善方法|Googleが重視する理由と対策 | ウィルゲート]]\\
[[https://christina04.hatenablog.com/entry/2017/04/12/002333|Webフォントのファイルサイズを小さくする - Carpe Diem]]\\
==== 付録 ====
[[tw>tomoyan596sp/status/1567951237596983296|Linuxでパッケージ化されているので、sfnt2woffとwoff2_compressが含まれるパッケージはこれで良さそうですけど試します🤔 $ sudo dnf install woff woff2-tools]]\\