「フォントパッケージガイドライン」の版間の差分
英語版から転載 |
他言語へのリンクを追加 |
||
| (同じ利用者による、間の6版が非表示) | |||
| 1行目: | 1行目: | ||
[[Category: |
[[Category:パッケージ開発]] |
||
[[en:Font package guidelines]] |
[[en:Font package guidelines]] |
||
[[pt:Font package guidelines]] |
[[pt:Font package guidelines]] |
||
[[zh-hans:Font package guidelines]] |
|||
{{Package Guidelines}} |
{{Package Guidelines}} |
||
このドキュメントは、[[フォント]] の [[PKGBUILD]] の記述に関する提案された標準ガイドラインをカバーしています。 |
|||
This document covers proposed standards and guidelines on writing [[PKGBUILD]]s for [[Fonts]]. |
|||
== 一般的なガイドライン == |
|||
== General guidelines == |
|||
=== |
=== パッケージの命名 === |
||
* [[wikipedia:TrueType|TTF]] |
* [[wikipedia:ja:TrueType|TTF]] フォント: {{ic|ttf-''fontname''}} |
||
* [[wikipedia:OpenType|OTF]] |
* [[wikipedia:ja:OpenType|OTF]] フォント: {{ic|otf-''fontname''}} |
||
フォントが [https://en.wikipedia.org/wiki/Variable_font variable font] の場合は、接尾辞 {{ic|-variable}} を追加します。 |
|||
{{Note|パッケージ名は完全に小文字にする必要があります。}} |
|||
{{Note|The package name should be entirely lowercase.}} |
|||
=== |
=== パッケージの説明 === |
||
パッケージの説明には少なくとも ''font'' という単語と、sans-serif, serif, monospace のうちどの種類のフォントなのかを含める必要があります。 |
|||
The package description should at least contain the word ''font'' and what type of font it is: sans-serif, serif or monospace. |
|||
=== |
=== アーキテクチャ === |
||
フォントはアーキテクチャに依存しません。{{ic|1=arch=(any)}} を使ってください。 |
|||
Fonts are architecture-independent. Use {{ic|1=arch=(any)}}. |
|||
=== |
=== 依存関係 === |
||
フォントは何かに依存しているわけではありません。しかし、リポジトリにある多くのパッケージは、{{Pkg|fontconfig}} と {{Pkg|xorg-mkfontscale}} を依存関係として含んでいます。これらはフォントパッケージがフォントキャッシュを更新するためにインストールスクリプトを使う必要があったときに必要でした。現在では多くの重複した作業は [[pacman フック]] によって行われています。fontconfig や xorg-mkfontscale をインストールすると、{{ic|/usr/share/fonts/}} にある全ての既存フォントがキャッシュされ、fontconfig や mkfontscale を使うことを強制する必要はありません。 |
|||
Fonts do not depend on anything. Many packages in the repositories, however, include {{Pkg|fontconfig}} and {{Pkg|xorg-mkfontscale}} as dependecies. Those were required when font packages needed to use install scripts to update the font cache – a lot of duplicate work now done by [[pacman hooks]]. If you install fontconfig or xorg-mkfontscale, all existing fonts in {{ic|/usr/share/fonts/}} will be cached making it unnecessary to force people to use fontconfig or mkfontscale. |
|||
=== |
=== 提供するもの === |
||
多くのアプリケーションは仮想パッケージ {{ic|ttf-font}} に依存しています。あなたのフォントファミリーが [https://archlinux.org/todo/fix-ttf-font-default-font-setup criteria] を満たすなら、{{ic|1=provides=('ttf-font')}} を追加してください。 |
|||
=== |
=== 出典 === |
||
以下のソースからフォントが利用可能かどうかを、この順番で確認します。 |
|||
See whether a font is available from the following sources in this order: |
|||
* GitHub のようなコードホスティングプラットフォームまたは公式ウェブサイト |
|||
* a code hosting platform like GitHub or an official website |
|||
* [https://fonts.google.com Google Fonts]: {{ic|<nowiki>https://fonts.google.com/download?family=</nowiki>''Name''}} |
* [https://fonts.google.com Google Fonts]: {{ic|<nowiki>https://fonts.google.com/download?family=</nowiki>''Name''}}. |
||
* [https://www.fontsquirrel.com Font Squirrel], [https://fontlibrary.org Font Library], [https://www.ffonts.net FFonts], [https://www.1001freefonts.com 1001 Fonts], [https://www.1001freefonts.com 1001 Free Fonts], [https://www.dafont.com DaFont] |
* [https://www.fontsquirrel.com Font Squirrel], [https://fontlibrary.org Font Library], [https://www.ffonts.net FFonts], [https://www.1001freefonts.com 1001 Fonts], [https://www.1001freefonts.com 1001 Free Fonts], [https://www.dafont.com DaFont] |
||
以下のサイトは推奨できません。 |
|||
The following sites are not recommended: |
|||
* [https://www.fontspace.com FontSpace] ( |
* [https://www.fontspace.com FontSpace] (チェックサムが原因不明で変更される) |
||
== |
== パッケージ == |
||
次のスニペットは、OFL(SIL Open Font License)の下でリリースされた OTF フォントの例です。 |
|||
The following snippet is an example for an OTF font released under the OFL (SIL Open Font License): |
|||
{{bc|<nowiki> |
{{bc|<nowiki> |
||
| 58行目: | 59行目: | ||
</nowiki>}} |
</nowiki>}} |
||
* |
* [[Wikipedia:ja:SIL_Open_Font_License|OFL]] は技術的には [[PKGBUILD#license|custom license]] ですので、各フォントパッケージのライセンスファイルは {{ic|/usr/share/licenses/$pkgname}} にインストールする必要があります。 |
||
* フォントに多くのフォントファイルが含まれている場合、インストール先のディレクトリに {{ic|OTF}} の代わりに {{ic|$pkgname}} を使うことを検討してください。 |
|||
* If the font contains many font files, consider using {{ic|$pkgname}} instead of {{ic|OTF}} for the destination directory. |
|||
== |
== パッケージ例 == |
||
* {{AUR|ttf-merriweather-sans}} |
* {{AUR|ttf-merriweather-sans}} |
||
* {{AUR|otf-commissioner}} – |
* {{AUR|otf-commissioner}} – OTF, TTF, variable バージョンを含むスプリットパッケージ |
||
== |
== 参照 == |
||
* [https://bbs.archlinux.org/viewtopic.php?pid=1888912 Forum discussion] |
* [https://bbs.archlinux.org/viewtopic.php?pid=1888912 Forum discussion] この記事について |
||
2023年6月30日 (金) 02:02時点における最新版
32ビット – CLR – クロス – Eclipse – Electron – Free Pascal – GNOME – Go – Haskell – Java – KDE – カーネル – Lisp – MinGW – Node.js – ノンフリー – OCaml – Perl – PHP – Python – R – Ruby – Rust – VCS – ウェブ – Wine
このドキュメントは、フォント の PKGBUILD の記述に関する提案された標準ガイドラインをカバーしています。
一般的なガイドライン
パッケージの命名
フォントが variable font の場合は、接尾辞 -variable を追加します。
パッケージの説明
パッケージの説明には少なくとも font という単語と、sans-serif, serif, monospace のうちどの種類のフォントなのかを含める必要があります。
アーキテクチャ
フォントはアーキテクチャに依存しません。arch=(any) を使ってください。
依存関係
フォントは何かに依存しているわけではありません。しかし、リポジトリにある多くのパッケージは、fontconfig と xorg-mkfontscale を依存関係として含んでいます。これらはフォントパッケージがフォントキャッシュを更新するためにインストールスクリプトを使う必要があったときに必要でした。現在では多くの重複した作業は pacman フック によって行われています。fontconfig や xorg-mkfontscale をインストールすると、/usr/share/fonts/ にある全ての既存フォントがキャッシュされ、fontconfig や mkfontscale を使うことを強制する必要はありません。
提供するもの
多くのアプリケーションは仮想パッケージ ttf-font に依存しています。あなたのフォントファミリーが criteria を満たすなら、provides=('ttf-font') を追加してください。
出典
以下のソースからフォントが利用可能かどうかを、この順番で確認します。
- GitHub のようなコードホスティングプラットフォームまたは公式ウェブサイト
- Google Fonts:
https://fonts.google.com/download?family=Name. - Font Squirrel, Font Library, FFonts, 1001 Fonts, 1001 Free Fonts, DaFont
以下のサイトは推奨できません。
- FontSpace (チェックサムが原因不明で変更される)
パッケージ
次のスニペットは、OFL(SIL Open Font License)の下でリリースされた OTF フォントの例です。
license=('OFL')
...
package() {
install -Dm644 -t "$pkgdir/usr/share/fonts/OTF" "path/to/font/*.otf"
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" "path/to/license/OFL.txt"
}
- OFL は技術的には custom license ですので、各フォントパッケージのライセンスファイルは
/usr/share/licenses/$pkgnameにインストールする必要があります。 - フォントに多くのフォントファイルが含まれている場合、インストール先のディレクトリに
OTFの代わりに$pkgnameを使うことを検討してください。
パッケージ例
- ttf-merriweather-sansAUR
- otf-commissionerAUR – OTF, TTF, variable バージョンを含むスプリットパッケージ
参照
- Forum discussion この記事について