# Fonts

## 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.

## 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_license>CC0</metadata_license>
      <name>Libertine</name>
      <summary>Linux Libertine Open fonts</summary>
      <font_classifier>Mono</font_classifier>
      <font_parent>Libertine</font_parent>
    </component>

## 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_license/>

  The `<metadata_license/>` tag is required. See 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/>` children, where at least one of them must have the property `type="default"` to indicate the application's primary screenshot. Every `<screenshot/>` tag must have at least one `<image/>` child, which should define the width and height of the referenced image in it's properties. The value of the `<image/>` tag is a direct URL to a screenshot uploaded to a public location on the web.

  Optionally, a `<screenshot/>` tag may have a `<caption/>` child, defining a short (not more then 255 characters!) description of what the user can see on the referenced screenshot.

<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 for a description of this tag.

<provides/>

  This tag is described in detail for generic components at .

  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.