Product SiteDocumentation Site

2.5. Fonts

2.5.1. Introduction

A software center can allow users to install additional fonts using font metadata. Also, applications can use font metadata to find missing fonts (for example, if a special mathematical font is needed) in the distribution's software sources. This meta-info specification describes how metadata for fonts or font collections should be structured.
Font packages can ship one or more files in /usr/share/metainfo/%{id}.metainfo.xml.
Font metadata files can – just like all other metainfo files – be translated. See the section about translation for more information.

2.5.2. Example file

A minimal font metainfo file can look like this:

<?xml version="1.0" encoding="UTF-8"?>
<component type="font">
  <id>LinuxLibertine.font</id>
  <metadata_license>CC0</metadata_license>
  <name>Linux Libertine</name>
  <summary>Linux Libertine fonts</summary>
  <provides>
    <font file="LinLibertine_R.otf">Linux Libertine O</font>
    <font file="LinLibertine_M.otf">Linux Libertine Mono</font>
  </provides>
</component>

2.5.3. File specification

Note that the XML root must have the type property set to font. This clearly identifies this metainfo document as describing a font.
<id/>
For fonts, the %{id} must follow the reverse-DNS scheme as described for generic components. For the product name part, it is recommended to take the the name of the font or font bundle without whitespace.
<metadata_license/>
The <metadata_license/> tag is required. See <metadata_license/> for a description of this tag.
<name/>
Set a name for the font or font collection.
<summary/>
A short description of the font described in this metainfo file.
<description/>
Add a long description of your font. Some rules apply (will soon be split out to a "description guidelines" section).
Do not assume the format is HTML. Only paragraph, ordered list and unordered list are supported at this time.
See the generic component <description/> for a detailed description of this tag.
<screenshots/>
A screenshot presents your font to the outside world.
If the font metadata does not define an own screenshot, the AppStream generator is supposed to render one or multiple sample images using the respective font.
See the generic component <screenshots/> for a detailed description of this tag.
<url/>
This is a recommended tag for links of type homepage. Links of type homepage should be a link to the upstream homepage for the application. See the generic component <url/> for a description of this tag.
<provides/> ↪ <font/>
This tag is described in detail for generic components at <provides/>.
You should add one or more children of type <font/> to make the font filenames and names known to the system. If this tag is not present, the name and id tag values can be used by the distribution's AppStream-generator to recreate this tag.
For a component of type font, the following tags are required and must be present: <id/>, <name/>, <summary/>, <metadata_license/>.