- Prev
- AppStream
- Next

## ⁠2.4. Fonts

### ⁠2.4.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 (e.g. a special methematical font is needed) in the distribution's software sources. This meta-info specification describes how metadata for fonts / font collections 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.4.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.4.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}` must be the name of the font or font bundle without whitespaces, and must be suffixed with `.font`.
<metadata_license/>
  The `<metadata_license/>` tag is required. See <metadata_license/> for a description of this tag.
<name/>
  Set a name for your 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/>
  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.

- Prev2.3. Addons
- Up
- Home
- Next2.5. Codecs