Product SiteDocumentation Site

2.3. Fonts

2.3.1. Introduction

It is a nice feature for a software center to allows users the installation of additional fonts. This meta-info specification describes how metadata about fonts should be structured.
Font packages can ship one or more files in /usr/share/appdata/%{id}.metainfo.xml.
Font metadata files can - just likle all other metainfo files - be translated. See the section about translation for more information about that.

2.3.2. Example file

The font meta-info file should look like this:
<?xml version="1.0" encoding="UTF-8"?>
<component type="font">
  <id>LinLibertine_M.otf</id>
  <metadata_licence>CC0</metadata_licence>
  <name>Libertine</name>
  <summary>Linux Libertine Open fonts</summary>
  <font_classifier>Mono</font_classifier>
  <font_parent>Libertine</font_parent>
</component>

2.3.3. File specification

Note that the XML root must have the type property set to font. This clearly identified this metainfo document as describing a font.
<id/>
For fonts, the %{id} is the same name as the installed font file.
<metadata_licence/>
The <metadata_licence/> tag is required. See Section 2.1, “Generic Component” for a description of this tag.
<name/>
Set a name for your font.
<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.
<screenshots/>
A screenshot presents your font to the outside world, and could be seen by hundreds or thousands of people.
The <screenshots/> tag contains multiple <screenshot/> childrens, where at least one of them must have the property type="default" to indicate the application's primary screenshot. Additionally, the <screenshot/> tags should define the width and height of the referenced screenshot as properties. The value of these tags is a direct URL to a screenshot uploaded to a public location on the web.
<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 See Section 2.1, “Generic Component” for a description of this tag.
<provides/>
This tag is described for generic components at Section 2.1, “Generic Component” in detail.
You can 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 will be used by the distribution's Appstream-generator to recreate this tag, so it's not required to add it.
<font_classifier/>
Define a description of the font face to caption it when compared against other fonts in the same family.
Some commonly used values are, for example:
  • Mono
  • Mono Extra Light
  • Outline
  • Sans
  • Serif
  • Condensed
  • ...
<font_parent/>
The name of the font package this particular font is part of. This is a required tag.