/usr/share/metainfo/%{id}.metainfo.xml
.
Note
font
component is in most cases not describing a single font, but rather a collection of fonts that are grouped together, usually by their art style or font-family.
<?xml version="1.0" encoding="UTF-8"?> <component type="font"> <id>com.latofonts.Lato</id> <metadata_license>MIT</metadata_license> <project_license>OFL-1.1</project_license> <name>Lato</name> <summary>A sanserif typeface family</summary> <description> <p> Lato is a sanserif typeface family designed in the Summer 2010 by Warsaw-based designer Łukasz Dziedzic (“Lato” means “Summer” in Polish). In December 2010 the Lato family was published under the open-source Open Font License by his foundry tyPoland, with support from Google. </p> </description> <provides> <font>Lato Regular</font> <font>Lato Italic</font> <font>Lato Bold</font> <font>Lato Light</font> <font>Lato Light Italic</font> ... </provides> </component>
type
property set to font
. This clearly identifies this metainfo document as describing a font.
%{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/>
tag is required. See <metadata_license/> for a description of this tag.
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.
<font/>
to make the font's full-names known. The full-name should be the same as given in the font file for the English language. If no full-name is set, a space-separated combination of the font's family
and style
is used instead. The font must have a family
defined to be included.
family
and style
to see what needs to be added to this tag, you can use the fc-query
utility of Fonconfig:
fc-query
--format='FN: %{fullname[0]}\nFS: %{family[0]} %{style[0]}\n'FONT-FILENAME
<provides> <font>Lato Heavy Italic</font> <font>Noto Kufi Arabic Bold</font> <font>Liberation Serif Bold Italic</font> <font>FontAwesome Regular</font> </provides>
<font/>
tags were defined, the AppStream collection data generator should try to extract them from the actual font files found in the software package/bundle.
<font/>
tag. This is important because the AppStream generator may use the data to pick the right fonts, and because applications expect the exact font they requested via AppStream to be present on the system after the component was installed (and not one which has different metadata).
fc-query
--format='%{lang}\n'FONT-FILENAME
<languages> <lang>de</lang> <lang>en</lang> <lang>cn</lang> </languages>
font
, the following tags are required and must be present: <id/>, <name/>, <summary/>, <metadata_license/>, <provides/> ↪ <font/>.