「フォントパッケージガイドライン」の版間の差分
(英語版から転載) |
(一部翻訳) |
||
| 4行目: | 4行目: | ||
{{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.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] (チェックサムが原因不明で変更される) |
== Package == |
== Package == |
||
2022年2月22日 (火) 23:03時点における版
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 (チェックサムが原因不明で変更される)
Package
The following snippet is an example for an OTF font released under the OFL (SIL Open Font License):
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"
}
- The OFL is technically a custom license, so each font package's license file needs to be installed under
/usr/share/licenses/$pkgname. - If the font contains many font files, consider using
$pkgnameinstead ofOTFfor the destination directory.
Example packages
- ttf-merriweather-sansAUR
- otf-commissionerAUR – split package with OTF, TTF and variable version
See also
- Forum discussion concerning this article