Libertinus

One family for the text, the notes, the code and the math

Libertinus is a family of fonts grown from Philipp Poll’s Linux Libertine and Linux Biolinum, which Khaled Hosny forked in 2012 and which Caleb Maclennan now maintains.The fonts are free, under the SIL Open Font License, and come with the theme in static/libertinus/. LaTeX loads the same family with \usepackage{libertinus}, or libertinus-otf under XeLaTeX and LuaLaTeX. It has a serif for the text, a sans-serif, a monospaced face and an OpenType math font drawn to match the serif, so a page set in it reads as one voice: the letters of xx and f(x)f(x) in a formula are the letters of the text around them.

Turning it on

This page sets both fonts in its front matter:

font: libertinus       # Libertinus Serif, Sans and Mono
mathFont: libertinus   # Libertinus Math

and a whole site sets them in its configuration:

[params]
  font = "libertinus"
[params.math]
  font = "libertinus"

The two are independent: Libertinus text with Euler math (mathFont: euler), or ET Book text with Libertinus Math, work as well.

The text faces

Libertinus Serif has true small caps, so small capitals and the first words of a new thought come from the font and are not shrunk capitals; old-style figures, which the numbers of the notes always use and which this page turns on for the whole text (1984, 2026) with the class option numerals: oldstyle; ligatures (fi, fl, ff, ffi); and Greek and Cyrillic: ἀρχή, λόγος, азбука.Each face comes in two files: the Latin characters, and the rest (Greek, Cyrillic, Hebrew, IPA, symbols), which a browser downloads only for a page that uses them, as this one does. Its italic is a true italic, and there is bold and bold italic.

The sans-serif, Libertinus Sans, replaces Gill Sans wherever the theme sets sans-serif: in the sans shortcode, in the tables and with the sfsidenotes class option.

Table 1: The four faces of Libertinus and where the theme uses them.
FaceUse on this page
Libertinus Seriftext, headings, notes
Libertinus Sanstables, sans
Libertinus Monocode
Libertinus Mathformulas

Code is set in Libertinus Mono:

func gauss(n int) int { return n * (n + 1) / 2 }

Math

Libertinus Math is an OpenType math font, so KaTeX hands the browser MathML, as for the Euler page: eiπ+1=0e^{i\pi} + 1 = 0, ∑k=0n(nk)=2n\sum_{k=0}^{n} \binom{n}{k} = 2^n, the alphabets ℝ\mathbb{R}, ℱ\mathcal{F}, 𝔤\mathfrak{g}, 𝐯\mathbf{v}, and displays,

∫−∞∞e−x2 dx=π,ζ(s)=∑n=1∞1ns=∏p prime11−p−s, \int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt{\pi}, \qquad \zeta(s) = \sum_{n=1}^{\infty} \frac{1}{n^s} = \prod_{p\ \text{prime}} \frac{1}{1 - p^{-s}},

with their alignment and numbers:

(a+b)2=(a+b)(a+b)=a2+2ab+b2,(nk)=n!k! (n−k)!. \begin{aligned} (a + b)^2 &= (a + b)(a + b) \\ &= a^2 + 2ab + b^2, \end{aligned} \qquad \binom{n}{k} = \frac{n!}{k!\,(n-k)!}. (1)

Equation (1) has a number of its own, and a sidenote holds math in the same font.For every real xx, ⌊x⌋≤x<⌊x⌋+1\lfloor x \rfloor \le x < \lfloor x \rfloor + 1. Unlike Euler, whose letters are upright, Libertinus Math sets the letters of variables in italic, as Computer Modern and most math fonts do.