Libertinus Fonts Documentation

repository·master·Indexed 23 days ago

https://github.com/alerque/libertinus

A collection of high-quality font families (Serif, Sans, Mono, and Math) forked from Linux Libertine and Linux Biolinum. The project provides improved typography, expanded OpenType features, and specialized math support. Documentation covers font family styles, design guidelines for glyph patterns and vertical metrics, FontForge development workflows, and detailed configuration for OpenType features such as ligatures, numeric styles, and stylistic sets via CSS.

Tokens
2.5K
Snippets
1
Records
21
Agent score
79%

What's inside Libertinus

  1. Overview of Libertinus Font Families

    master

    The Libertinus Fonts project provides several type families for different use cases:

    • Libertinus Serif: 6 typefaces covering three weights (Regular, Semibold, Bold) in two styles (Regular, Italic). Forked from Linux Libertine.
    • Libertinus Sans: 3 sans-serif typefaces covering Regular, Bold, and Italic. Forked from Linux Biolinum.
    • Libertinus Mono: 1 monospace typeface derived from the serif family. Forked from Linux Libertine Mono.
    • Libertinus Math: 1 OpenType math typeface for math-capable applications (e.g., LuaTeX, XeTeX, MS Word 2007+).

    Special-use families:

    • Libertinus Serif Display: Optimized for large-scale display.
    • Libertinus Serif Initials: Includes outlined capital letter glyphs for decorations like drop-caps.
    • Libertinus Keyboard: Includes keyboard key outlines around characters for technical documentation.
  2. Identify the styles available in the Libertinus font family

    master

    The Libertinus font family currently consists of six distinct styles, each suited for different typographic needs:

    • Regular and Italic: Standard weight ("book") designed for 11pt text.
    • Bold and Bold Italic: Heavier forms of the Regular/Italic styles.
    • Display: A special light and elegant variant intended for titles and headlines.
    • Small Caps: An extended set of the Regular style containing a subset of small capitals.
  3. Use standard OpenType font features in Libertinus

    master

    Libertinus supports various OpenType features that can be enabled or disabled. Most of these are accessible via high-level CSS properties or GUI controls in DTP software.

    Feature Summary

    • Small Caps: +smcp and +c2sc
    • Ligatures: -liga (standard), +hlig (historical), +dlig (discretionary)
    • Contextual Alternates: -calt
    • Kerning: -kern
    • Capital Spacing: +cpsp, case
    • Slashed zero: +zero
    • Numerals: -tnum (tabular), +pnum (proportional), -lnum (lining), +onum (old-style)
    • Fractions: +frac (vulgar)
    • Sub/Superscripts: +sinf, +sups
    • Diacritics: -mark, -mkmk
    • Stylistic Alternates: +salt
  4. Understand the design patterns of Libertinus: the 'n' and 'o' glyphs

    master

    Libertinus uses two primary glyphs as design patterns to maintain consistency across the font. Modifications to these letters affect all derived characters.

    The 'n' pattern (Serif-based letters)

    The lower-case n defines the following for derived letters (like m, r, h, i, j, l, u):

    • Serifs: The form and length of foot, head, and ascender serifs.
    • Stem width: 79 EM for lower-case; 85 EM for upper-case.
    • Spacing: The inner distance between stems (counter space) dictates tracking.
    • Font-weight: Determined by the combination of stem width and tracking.
    • x-height and overshoot: The body of lower-case letters is 429 EM tall. Round parts overshoot the x-height and baseline by approximately 10 EM to maintain optical height parity with letters like x.

    The 'o' pattern (Round-part letters)

    The lower-case o defines characteristics for all letters with round parts (like e, c, and the round parts of b, d, p, q, g):

    • Stress: The calligraphic angle.
    • Stroke width: Minimum and maximum width of round strokes (35 EM for thinnest, 86 EM for boldest).
    • Spacing: The white space of the counter should be balanced with the inter-glyph spacing (the sum of optical bearings).
  5. Manage glyph layers in FontForge

    master

    When developing or inspecting Libertinus glyphs in FontForge, use the following layer structure:

    • glyph layer: Stores the actual contours of the glyph.
    • background layer: Used to store contours from a different glyph for visual comparison (e.g., comparing form, height, or counter width).
    • guide layer: Contains metrical lines such as x-height and caps-height. This layer is shared across all glyphs and should remain untouched.
  6. Choose between TTF and OTF font formats

    master

    The Libertinus fonts are available in two formats. Choose based on your software requirements and intended use:

    • TTF (TrueType): Generally offers better software support. The TTF families are named Linux Libertine and Linux Biolinum.
    • OTF (OpenType): Offers advantages in printing. The OTF families are named LinuxLibertine O and Linux Biolinum O.

    Note: OpenOffice does not support OTF formats. OpenType features are available in both formats.

  7. Understand Libertinus vertical metrics and EM units

    master

    Libertinus uses a Cartesian coordinate system where the height of the EM square is divided into 1000 units called EM units (or simply EM).

    Key vertical metrics include:

    • x-height: The upper horizontal border of lower-case letters like a, c, e, and x.
    • caps-height: The height of upper-case glyphs (which are slightly shorter than lower-case ascenders).
    • ascender-height: The height of the ascenders in lower-case glyphs.
    • numbers-height: The height specific to numeric glyphs.
    • Small caps caps-height: The height for small capital glyphs.
    • Overshoot margins: The area where round glyph-parts extend beyond the x-height or baseline to create the optical illusion of evenness.
  8. Draw splines and contours in FontForge

    master

    Libertinus uses Bézier curves for its vector-based TTF and OTF formats. FontForge supports four point types which can be managed via the point menu or by right-clicking a point:

    1. curve point: Left and right handles are joined.
    2. h/v curve point: Handles are fixed at 90° (horizontal or vertical).
    3. corner point: Left and right handles are independent.
    4. tangent point: The handle follows the direction of the incoming spline.

    Important Contour Rules:

    • Contours must always be closed to ensure they fill correctly.
    • Outer contours must be tagged clockwise.
    • Inner contours (counters) must be tagged counter-clockwise.
  9. Build Libertinus Fonts from source

    master

    Font files are generated using Fontship. To build your own copy or modify the sources, follow these steps:

    1. Clone the repository. To avoid downloading ~300MB of historical binary font changes, use the --single-branch flag:
      git clone --single-branch <repository-url>
    2. Run the Fontship make command:
      fontship make
    $ fontship make
  10. Create accented glyphs using references

    master

    Instead of copying contours for accented characters (e.g., é being e + ´), use references that point to the original base glyphs. This ensures that improvements to the base glyph's metrics are automatically applied to the accented version.

    Example: Creating the letter i To create i, use a reference to the glyphs ı (named dottlessi) and ˙ (named dotaccent).

    Crucial Step: To ensure metric improvements in the referenced glyph are passed down to the derived glyph, you must enable the "Use my metrics" checkbox in FontForge.