コンテンツにスキップ

「フォントパッケージガイドライン」の版間の差分

提供: ArchWiki
削除された内容 追加された内容
Kgx (トーク | 投稿記録)
英語版から転載
 
Kgx (トーク | 投稿記録)
一部翻訳
4行目: 4行目:
{{Package Guidelines}}
{{Package Guidelines}}


このドキュメントは、[[フォント]] の [[PKGBUILD]] の記述に関する提案された標準ガイドラインをカバーしています。
This document covers proposed standards and guidelines on writing [[PKGBUILD]]s for [[Fonts]].


== 一般的なガイドライン ==
== General guidelines ==


=== Package naming ===
=== パッケージの命名 ===


* [[wikipedia:TrueType|TTF]] fonts: {{ic|ttf-''fontname''}}
* [[wikipedia:ja:TrueType|TTF]] フォント: {{ic|ttf-''fontname''}}
* [[wikipedia:OpenType|OTF]] fonts: {{ic|otf-''fontname''}}
* [[wikipedia:ja:OpenType|OTF]] フォント: {{ic|otf-''fontname''}}


If the font is a [[Wikipedia:Variable fonts|variable font]], add the suffix {{ic|-variable}}.
フォントが [https://en.wikipedia.org/wiki/Variable_font variable font] の場合は、接尾辞 {{ic|-variable}} を追加します。


{{Note|パッケージ名は完全に小文字にする必要があります。}}
{{Note|The package name should be entirely lowercase.}}


=== Package description ===
=== パッケージの説明 ===


パッケージの説明には少なくとも ''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.


=== Architecture ===
=== アーキテクチャ ===


フォントはアーキテクチャに依存しません。{{ic|1=arch=(any)}} を使ってください。
Fonts are architecture-independent. Use {{ic|1=arch=(any)}}.


=== Dependencies ===
=== 依存関係 ===


フォントは何かに依存しているわけではありません。しかし、リポジトリにある多くのパッケージは、{{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.


=== Provides ===
=== 提供するもの ===


Many applications rely on the virtual package {{ic|ttf-font}}. If your font family meets the [https://archlinux.org/todo/fix-ttf-font-default-font-setup criteria], add {{ic|1=provides=('ttf-font')}}.
多くのアプリケーションは仮想パッケージ {{ic|ttf-font}} に依存しています。あなたのフォントファミリーが [https://archlinux.org/todo/fix-ttf-font-default-font-setup criteria] を満たすなら、{{ic|1=provides=('ttf-font')}} を追加してください。


=== Source ===
=== 出典 ===


以下のソースからフォントが利用可能かどうかを、この順番で確認します。
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] (checksums change for unknown reasons)
* [https://www.fontspace.com FontSpace] (チェックサムが原因不明で変更される)


== Package ==
== Package ==

2022年2月22日 (火) 23:03時点における版

このドキュメントは、フォントPKGBUILD の記述に関する提案された標準ガイドラインをカバーしています。

一般的なガイドライン

パッケージの命名

  • TTF フォント: ttf-fontname
  • OTF フォント: otf-fontname

フォントが variable font の場合は、接尾辞 -variable を追加します。

ノート パッケージ名は完全に小文字にする必要があります。

パッケージの説明

パッケージの説明には少なくとも font という単語と、sans-serif, serif, monospace のうちどの種類のフォントなのかを含める必要があります。

アーキテクチャ

フォントはアーキテクチャに依存しません。arch=(any) を使ってください。

依存関係

フォントは何かに依存しているわけではありません。しかし、リポジトリにある多くのパッケージは、fontconfigxorg-mkfontscale を依存関係として含んでいます。これらはフォントパッケージがフォントキャッシュを更新するためにインストールスクリプトを使う必要があったときに必要でした。現在では多くの重複した作業は pacman フック によって行われています。fontconfig や xorg-mkfontscale をインストールすると、/usr/share/fonts/ にある全ての既存フォントがキャッシュされ、fontconfig や mkfontscale を使うことを強制する必要はありません。

提供するもの

多くのアプリケーションは仮想パッケージ ttf-font に依存しています。あなたのフォントファミリーが criteria を満たすなら、provides=('ttf-font') を追加してください。

出典

以下のソースからフォントが利用可能かどうかを、この順番で確認します。

以下のサイトは推奨できません。

  • 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 $pkgname instead of OTF for the destination directory.

Example packages

See also