差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
web:web_font [2022/09/09 04:54] – [WOFFConverter (Windows)] ともやん | web:web_font [2025/04/12 11:14] (現在) – [TrueType(.ttf) から Web Open Font Format(.woff と .woff2) へ変換🤤] ともやん | ||
---|---|---|---|
行 4: | 行 4: | ||
===== Web フォントの形式 ===== | ===== Web フォントの形式 ===== | ||
^ 拡張子 | ^ 拡張子 | ||
- | | .woff2 | + | | .woff2 |
- | | .woff | [[https:// | + | | .woff | [[https:// |
- | | .ttf | [[https:// | + | | .ttf | [[wwjp>TrueType|TrueType]] |
- | | .eof | [[https:// | + | | .eof | [[wwjp>Embedded_OpenType|Embedded OpenType]] |
* EOT 形式と TTF 形式はデフォルトで圧縮されていない。\\ これらの形式を提供する場合は GZIP 圧縮を適用するように Web サーバーを設定する必要がある。 | * EOT 形式と TTF 形式はデフォルトで圧縮されていない。\\ これらの形式を提供する場合は GZIP 圧縮を適用するように Web サーバーを設定する必要がある。 | ||
行 13: | 行 13: | ||
* WOFF2 では独自の前処理アルゴリズムと圧縮アルゴリズムが使用されており、WOFF 形式よりも約 30% ファイルサイズが削減されている。 | * WOFF2 では独自の前処理アルゴリズムと圧縮アルゴリズムが使用されており、WOFF 形式よりも約 30% ファイルサイズが削減されている。 | ||
- | ===== TrueType(.ttf) | + | ===== TrueType(.ttf) |
Linux では sfnt2woff (ttf => woff) と woff2_compress (ttf => woff2) コマンドが必要...🤔\\ | Linux では sfnt2woff (ttf => woff) と woff2_compress (ttf => woff2) コマンドが必要...🤔\\ | ||
<WRAP color_term> | <WRAP color_term> | ||
<WRAP color_command>< | <WRAP color_command>< | ||
- | $ dnf provides sfnt2woff woff2_compress | + | <font color="# |
</ | </ | ||
<WRAP color_result>< | <WRAP color_result>< | ||
- | メタデータの期限切れの最終確認: | + | メタデータの期限切れの最終確認: |
- | woff-0.20091126-25.fc36.x86_64 : Encoding and Decoding for Web Open Font Format(Woff) | + | woff-0.20091126-26.fc37.x86_64 : Encoding and Decoding for Web Open Font Format(Woff) |
Repo : fedora | Repo : fedora | ||
一致: | 一致: | ||
ファイル名 | ファイル名 | ||
- | woff2-tools-1.0.2-14.fc36.x86_64 : Web Open Font Format 2.0 tools | + | woff2-tools-1.0.2-15.fc37.x86_64 : Web Open Font Format 2.0 tools |
Repo : fedora | Repo : fedora | ||
一致: | 一致: | ||
行 36: | 行 36: | ||
<WRAP color_term> | <WRAP color_term> | ||
<WRAP color_command>< | <WRAP color_command>< | ||
- | $ sudo dnf install woff woff2-tools | + | <font color="# |
</ | </ | ||
<WRAP color_result>< | <WRAP color_result>< | ||
- | メタデータの期限切れの最終確認: 1:07:15 時間前の 2022年09月09日 02時50分04秒 に実施しました。 | + | リポジトリの更新を読み込み中: |
- | 依存関係が解決しました。 | + | リポジトリを読み込みました。 |
- | ============================================================================================================== | + | < |
- | | + | Installing: |
- | ============================================================================================================== | + | <font color="# |
- | インストール: | + | <font color="# |
- | | + | |
- | | + | |
- | トランザクションの概要 | + | Transaction Summary: |
- | ============================================================================================================== | + | Installing: |
- | インストール | + | |
- | ダウンロードサイズの合計: 45 k | + | パッケージサイズ 57 KiB 、ダウンロードサイズ |
- | インストール後のサイズ: 88 k | + | 完了後、124 KiB のサイズが利用されます(インストール 124 KiB、削除 0 B)。 |
- | これでよろしいですか? [y/N]: y | + | [1/2] woff-0:0.20091126-41.fc41.x86_64 |
- | パッケージのダウンロード: | + | [2/2] woff2-tools-0:1.0.2-20.fc41.x86_64 |
- | (1/2): woff-0.20091126-25.fc36.x86_64.rpm 103 kB/s | | + | ------------------------------------------------------------------------------------------------------------------ |
- | (2/2): woff2-tools-1.0.2-14.fc36.x86_64.rpm 99 kB/s | | + | [2/2] Total 100% | 16.5 KiB/s | |
- | -------------------------------------------------------------------------------------------------------------- | + | |
- | 合計 | + | |
- | トランザクションの確認を実行中 | + | |
- | トランザクションの確認に成功しました。 | + | |
- | トランザクションのテストを実行中 | + | |
- | トランザクションのテストに成功しました。 | + | |
トランザクションを実行中 | トランザクションを実行中 | ||
- | 準備 | + | [1/4] パッケージ ファイルを検証 |
- | | + | [2/4] トランザクションの準備 |
- | | + | [3/4] インストール中 woff2-tools-0:1.0.2-20.fc41.x86_64 |
- | scriptletの実行中: woff-0.20091126-25.fc36.x86_64 | + | [4/4] インストール中 woff-0: |
- | 検証 | + | 完了しました! |
- | 検証 | + | |
- | + | ||
- | インストール済み: | + | |
- | woff-0.20091126-25.fc36.x86_64 | + | |
- | + | ||
- | 完了しました! | + | |
</ | </ | ||
</ | </ | ||
+ | ==== オープンなライセンスの 白源/ | ||
+ | [[git> | ||
+ | [[git> | ||
+ | [[wwjp> | ||
+ | {{page> | ||
+ | |||
+ | ==== TrueType(.ttf) から Web Open Font Format(.woff と .woff2) へ変換🤤 ==== | ||
<WRAP color_term> | <WRAP color_term> | ||
- | <WRAP color_command>< | + | <WRAP color_command>< |
- | $ curl -LO https://github.com/yuru7/HackGen/releases/download/v2.7.0/HackGen_NF_v2.7.0.zip | + | <font color="# |
- | </code></ | + | <font color="# |
- | <WRAP color_result>< | + | </pre></ |
- | % Total % Received % Xferd Average Speed | + | <WRAP color_result>< |
- | Dload Upload | + | Processing HackGen35ConsoleNF-Bold.ttf => HackGen35ConsoleNF-Bold.woff2 |
- | | + | Compressed 10875327 to 4569738. |
- | 100 42.0M 100 42.0M 0 | + | Processing HackGen35ConsoleNF-Regular.ttf => HackGen35ConsoleNF-Regular.woff2 |
- | </code></ | + | Compressed 10427620 to 4393224. |
+ | Processing HackGenConsoleNF-Bold.ttf => HackGenConsoleNF-Bold.woff2 | ||
+ | Compressed 10876056 to 4571220. | ||
+ | Processing HackGenConsoleNF-Regular.ttf => HackGenConsoleNF-Regular.woff2 | ||
+ | Compressed 10426503 to 4395310. | ||
+ | </ | ||
- | <WRAP color_command>< | + | <WRAP color_command>< |
- | $ unzip HackGen_NF_v2.7.0.zip | + | <font color="# |
- | </code></ | + | </pre></ |
- | <WRAP color_result>< | + | <WRAP color_result>< |
- | Archive: | + | 合計 94328 |
- | creating: HackGen_NF_v2.7.0/ | + | -rw-r--r-- 1 tomoyan tomoyan 13462380 12月 29 16:04 HackGen35ConsoleNF-Bold.ttf |
- | | + | -rw-r--r-- 1 tomoyan tomoyan |
- | | + | -rw-r--r-- 1 tomoyan tomoyan |
- | | + | -rw-r--r-- 1 tomoyan tomoyan 12922844 12月 29 16:04 HackGen35ConsoleNF-Regular.ttf |
- | | + | -rw-r--r-- 1 tomoyan tomoyan |
- | | + | -rw-r--r-- 1 tomoyan tomoyan |
- | | + | -rw-r--r-- 1 tomoyan tomoyan 13464288 12月 29 16:04 HackGenConsoleNF-Bold.ttf |
- | | + | -rw-r--r-- 1 tomoyan tomoyan |
- | | + | -rw-r--r-- 1 tomoyan tomoyan |
- | </code></ | + | -rw-r--r-- 1 tomoyan tomoyan 12922800 12月 29 16:04 HackGenConsoleNF-Regular.ttf |
+ | -rw-r--r-- 1 tomoyan tomoyan | ||
+ | -rw-r--r-- 1 tomoyan tomoyan | ||
+ | </ | ||
+ | |||
+ | <WRAP color_command>< | ||
+ | <font color="# | ||
+ | <font color="# | ||
+ | </ | ||
+ | <WRAP color_result>< | ||
+ | Processing HackGen-Bold.ttf | ||
+ | Compressed 9098739 to 3604203. | ||
+ | Processing HackGen-Regular.ttf => HackGen-Regular.woff2 | ||
+ | Compressed 8646368 to 3431454. | ||
+ | Processing HackGen35-Bold.ttf => HackGen35-Bold.woff2 | ||
+ | Compressed 9098354 to 3603655. | ||
+ | Processing HackGen35-Regular.ttf => HackGen35-Regular.woff2 | ||
+ | Compressed 8645686 to 3430103. | ||
+ | Processing HackGen35Console-Bold.ttf => HackGen35Console-Bold.woff2 | ||
+ | Compressed 9118148 to 3611814. | ||
+ | Processing HackGen35Console-Regular.ttf => HackGen35Console-Regular.woff2 | ||
+ | Compressed 8670425 to 3441278. | ||
+ | Processing HackGenConsole-Bold.ttf => HackGenConsole-Bold.woff2 | ||
+ | Compressed 9118925 to 3614983. | ||
+ | Processing HackGenConsole-Regular.ttf => HackGenConsole-Regular.woff2 | ||
+ | Compressed 8669356 to 3442626. | ||
+ | </ | ||
+ | |||
+ | <WRAP color_command>< | ||
+ | <font color="# | ||
+ | </ | ||
+ | <WRAP color_result>< | ||
+ | 合計 154060 | ||
+ | -rw-r--r-- 1 tomoyan tomoyan 11239136 12月 29 16:04 HackGen-Bold.ttf | ||
+ | -rw-r--r-- 1 tomoyan tomoyan | ||
+ | -rw-r--r-- 1 tomoyan tomoyan | ||
+ | -rw-r--r-- 1 tomoyan tomoyan 10694536 12月 29 16:04 HackGen-Regular.ttf | ||
+ | -rw-r--r-- 1 tomoyan tomoyan | ||
+ | -rw-r--r-- 1 tomoyan tomoyan | ||
+ | -rw-r--r-- 1 tomoyan tomoyan 11238016 12月 29 16:04 HackGen35-Bold.ttf | ||
+ | -rw-r--r-- 1 tomoyan tomoyan | ||
+ | -rw-r--r-- 1 tomoyan tomoyan | ||
+ | -rw-r--r-- 1 tomoyan tomoyan 10693068 12月 29 16:04 HackGen35-Regular.ttf | ||
+ | -rw-r--r-- 1 tomoyan tomoyan | ||
+ | -rw-r--r-- 1 tomoyan tomoyan | ||
+ | -rw-r--r-- 1 tomoyan tomoyan 11249376 12月 29 16:04 HackGen35Console-Bold.ttf | ||
+ | -rw-r--r-- 1 tomoyan tomoyan | ||
+ | -rw-r--r-- 1 tomoyan tomoyan | ||
+ | -rw-r--r-- 1 tomoyan tomoyan 10709828 12月 29 16:04 HackGen35Console-Regular.ttf | ||
+ | -rw-r--r-- 1 tomoyan tomoyan | ||
+ | -rw-r--r-- 1 tomoyan tomoyan | ||
+ | -rw-r--r-- 1 tomoyan tomoyan 11251244 12月 29 16:04 HackGenConsole-Bold.ttf | ||
+ | -rw-r--r-- 1 tomoyan tomoyan | ||
+ | -rw-r--r-- 1 tomoyan tomoyan | ||
+ | -rw-r--r-- 1 tomoyan tomoyan 10709744 12月 29 16:04 HackGenConsole-Regular.ttf | ||
+ | -rw-r--r-- 1 tomoyan tomoyan | ||
+ | -rw-r--r-- 1 tomoyan tomoyan | ||
+ | </ | ||
</ | </ | ||
行 113: | 行 167: | ||
===== 参考文献 ===== | ===== 参考文献 ===== | ||
+ | [[https:// | ||
[[https:// | [[https:// | ||
[[https:// | [[https:// | ||
[[https:// | [[https:// | ||
[[https:// | [[https:// | ||
+ | [[https:// | ||
+ | [[https:// | ||
+ | |||
+ | ==== 付録 ==== | ||
+ | [[tw> | ||