Skip to content
Myr

docs: provide a primer on the fontconfig format

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Mark Stosberg · committed by Daniel Eklöf · parent db3385d · Browse files · 1 file+38 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+38 added−1 removed

  • other:+38 added−1 removed

1 file+38 added−1 removed

modified:doc/fuzzel.ini.5.scd+38 added-1 removed
57 unmodified lines
58 Comma separated list of fonts to use, in fontconfig format. That59 is, a font name followed by a list of colon-separated60 options. Most noteworthy is *:size=n*, which is used to set the61 font size. Note that the font size is also affected by the62 *dpi-aware* option.62 *dpi-aware* option. See *FONT CONFIG* below for details.63 64 Examples:65 - Dina:weight=bold:slant=italic66 - Courier New:size=12
556 unmodified lines
623 - custom-17: _Mod1+17_624 - custom-18: _Mod1+18_625 - custom-19: _Mod1+19_626627# FONT CONFIG628629Fontconfig uses a flexible string format for specifying fonts that630allows you to define font families, styles, weights, and various631properties. The basic syntax follows this pattern:632633 "Family Name:style=Style:weight=Weight:size=Size"634635Common Properties:636637- *family* - Font family name638- *style* - italic, oblique, roman639- *weight* - light, normal, bold, black (or numeric values 100-900)640- *size* - Point size641- *slant* - italic, oblique, roman642- *width* - condensed, normal, expanded643644645Fontconfig supports fallback fonts. You can specify multiple font646families separated by commas. The fallback fonts are searched in the647order they appear. If a glyph cannot be found in any of the fallback648fonts, the dynamic fallback list from fontconfig (for the primary font)649is searched. Ex:650651 "My Custom Font, DejaVu Sans:weight=bold, sans-serif"652653Fontconfig always returns something unless you don't have any fonts installed,654regardless of what font name you give it. You can check fonts that would be matched655with `fc-match -s YourFontName`.656657The font library Fuzzel uses, fcft, will search the explicit fallbacks whenever a glyph658cannot be found in the primary font. When it cannot find a glyph in the explicit659fallbacks, then it searches the fontconfig fallbacks of the first font in Fuzzel's list.660661This design allows a custom fallback sequence as well as custom font options for each662fallback.663 664# SEE ALSO665666- *fuzzel*(1)667- *https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html*
1 unmodified line