Three open-source typefaces, recalibrated into one family of 46 fonts

Imagine one sentence that names a setting in code and then quotes the number it produced, set at a single size in a good open text face, Merriweather Sans, with the code in a good open code face, IBM Plex Mono. The code's lowercase letters come out about 7% shorter than the words around them (x-heights of 0.516 and 0.557 em), and the line reads as if two people had typed it. Perfidy is a type family for interfaces, documents and code, built to close that seam.

It has four parts: Perfidy Text and Perfidy Display come from Merriweather Sans, Perfidy SemiMono from iA Writer Quattro, and Perfidy Mono from IBM Plex Mono. All three sources are released under the SIL Open Font License, and so is Perfidy. The letter shapes are the sources' own; what changed is weight, size and spacing. Each style was set to a stroke thickness on one scale, each family was scaled to an x-height of 0.50 em, and each style was given its own letter spacing, so a line can switch between text, code and figures without the letters changing height or color. The family has 46 fonts, LaTeX and web math setups, and a Windows installer. This page, like every other page that shares the site's stylesheet, is set in it: Text for reading, Display for the top headings, Mono for code, charts and data notes.

Fonts

Perfidy on GitHub

All 46 fonts as TTF and WOFF2, a LaTeX package with matching math, CSS for the web, a Windows installer, and the build script that makes every font from the original source files.

Get the fonts
Perfidy Display Bold

Perfidy

Perfidy Display Light

Metaphysical, standardizing, 1,250.00

Perfidy Text, Mono and SemiMono in one paragraph

A steady-state reactor with first-order kinetics converts 87% of its feed. Set conv_target = 0.87 in the config, and the solver reports the outlet at 412.60 K. The italic and the bold sit on the same line without changing its height.

Perfidy Mono

if reactor.conversion >= 0.85: ship(lot_id=0x2F)

Perfidy SemiMono

Glamorized strategical packet loss — 42 ms / 1,024 KB

Set live in the fonts this page describes.

How the family is put together

Why assemble a family from three sources at all? Because none of the open typefaces compared has a text face, a display cut, a semi-monospace and a monospace drawn to one plan. The work therefore becomes one of measurement: every way the parts agree is a number that was chosen and then hit.

FamilyBuilt fromStyles
Perfidy TextMerriweather Sans, upright and italic12
Perfidy DisplayMerriweather Sans, upright and italic12
Perfidy SemiMonoiA Writer Quattro12
Perfidy MonoIBM Plex Mono10

Merriweather Sans came closest to the target's letter shapes among the open fonts compared, and it brings two conveniences: a variable weight axis from which any weight can be taken, and a drawn italic with an axis of its own. Perfidy Display uses the same outlines with tighter spacing, for sizes from about 22 px up. iA Writer Quattro is drawn from IBM Plex Mono with its letters on four widths instead of one, which is what makes it a semi-monospace. IBM Plex Mono matched the target's code lines most closely of the monospaces compared. Because Quattro is drawn from it, the two code faces are relatives rather than strangers.

Fira Math is included unmodified for equations. In LaTeX the Latin letters and digits inside equations are taken from Perfidy Text, so a variable in an equation matches the same letter in the sentence around it rather than arriving from a different typeface.

What was changed, letter by letter

Five changes were applied, and the figures below show each one on real outlines. Each figure animates once when it scrolls into view, and its buttons replay it; with reduced motion turned on in the system settings, the buttons change the figure at once instead.

Weight: one scale of stroke thickness

Weight is measured here as the thickness of the vertical stem of n, divided by the x-height. The six Perfidy weights are set to targets on that measure in near-equal steps, from 0.110 for Light to 0.310 for ExtraBold (a stem nearly three times as thick). Merriweather Sans is a variable font with a weight axis from 300 to 800, and each Perfidy weight is the point on that axis where the stem reaches its target. Those points are not evenly spaced: Regular sits at 305, Medium at 370 and SemiBold at 500. The source thickens its stems faster in some parts of the axis than in others, so equal steps in thickness need unequal steps on the dial.

The Light target is thinner than anything Merriweather Sans draws: its lightest master, at 300, has a stem of 0.150, against a Light target of 0.110. Perfidy Light was made by extending the line between the instances at 300 and 400 to 240, past the end of the axis. Every point of every letter moves along that same straight line, so the letters keep the source's proportions. But at 240 they are outside anything the source's designers drew.

The letters a and n, drawn from the Merriweather Sans outlines at the point on the weight axis that the slider selects, at Perfidy's scale. The solid axis is the source's design space (300 to 800). The dashed stretch below 300 is extrapolated. The circles are the six Perfidy weights; the first, Light, sits on the dashed stretch. The stem ratio is measured on the n at each sampled point of the axis and interpolated between them.

Size: one x-height

Set at the same font size, the three sources disagree on x-height: 0.557 em for Merriweather Sans and 0.516 em for Quattro and Plex Mono. Next to each other in one line, the code is visibly smaller than the text, which is the seam the opening imagined. Each source was scaled uniformly (by 0.900, 0.971 and 0.973) so that all three have an x-height of 0.50 em. Letter shapes and proportions are unchanged; only the size is.

The letters x, h and p from each source, at one font size. The dashed brown line is the source's own x-height and the blue line is 0.50 em; the gap between them is widest for Merriweather Sans.

Spacing: Text and Display

Each of the 46 styles carries its own tracking: a fixed amount added to or taken from the width of every letter, set so that words in each style come out the width of the same words in the target. Perfidy Text Regular adds 0.0092 em per letter to the source's spacing. Perfidy Display Regular takes away 0.0305 em, because large type looks loose at the spacing that suits small type. So at Regular the two cuts sit 0.0092 plus 0.0305, or about 0.040 em per letter, apart. That is the widest gap in the family. Display is tighter than Text in every style, and the gap narrows to 0.007 em at ExtraBold. Kerning is the source's own and is unchanged.

One word in Perfidy Text Regular's outlines. The Text and Display positions are HarfBuzz's, from each font's widths and kerning; the source positions are the Text positions with Perfidy's tracking taken out. The blue ticks mark where each letter starts and the blue line marks where the word ends.

Italic: a drawn italic, not a slanted upright

An italic can be a slanted copy of the upright letters or a separately drawn design. Perfidy's italics are Merriweather Sans' own drawn italic, each taken at the point on the italic's weight axis where its stems reach the same target as the upright's, so an italic word matches the weight of the upright words around it. A drawn italic also changes forms that a slant leaves alone. The a loses its upper storey, and the v and w round off at the base.

The letters a, v and w from Perfidy Text Regular and Perfidy Text Italic. The middle state slants the upright outlines by the italic's own angle, 7.5°.

Code: a narrower cell

In a monospace every character sits in a cell of one width. IBM Plex Mono's cell is 0.600 em; scaling Plex Mono to the 0.50 em x-height narrows the cell to 0.584 em, and Perfidy Mono's tracking narrows it again to 0.560 em, the width that matches the target's code lines. The cell is narrower but still the same for every character. Columns still align.

The letters m, i and l in their cells. Dashed brown: the font's x-height. Blue: 0.50 em. The narrow i gets as wide a cell as the m.

What it is for

Interfaces. Labels, numbers and code in one view can share a baseline, an x-height and a line height. All four families use the same vertical metrics, so a line set in CSS with line-height: normal is 1.25 em tall whichever family it is in. A change of family inside a paragraph does not move the line.

Numbers. Perfidy Text and Display carry tabular figures for columns that must align, oldstyle figures for running text, built fractions, superiors and inferiors for units and formulas, ordinals, small capitals and a slashed zero.

FeatureOffOn
Tabular figures1,111.11
8,999.90
1,111.11
8,999.90
Fractions1/2 3/4 22/71/2 3/4 22/7
InferiorsH2O C4H10H2O C4H10
Small capitalsSmall CapsSmall Caps
Slashed zero0O 10000O 1000

Technical documents. With LuaLaTeX or XeLaTeX, \usepackage{perfidy} sets the text, headings, code and math. The math is Fira Math, an open math font with the layout tables TeX needs, with Latin letters and digits taken from Perfidy Text. For web pages, the repository includes CSS that does the same for KaTeX, and a setting for MathML.

A page set with the perfidy LaTeX package: a reactor mole balance, the Gibbs energy of mixing and the Peng–Robinson equation of state, with the variables in Perfidy Text Italic and the operators in Fira Math.

From the example document in the repository, compiled with XeLaTeX and the perfidy package. The variables are Perfidy Text Italic, not the math font, so they match the same letters in prose.

Where do the target numbers come from?

The target proportions are those of Ghost, a commercial type family published by Sharp Type in 2026. They were measured from the specimen Sharp Type publishes, in which each weight of each cut sets one word across the full width of the page. Each line was rendered at 600 dpi and measured three ways: the x-height as a fraction of the point size, the thickness of the vertical stems as a fraction of the x-height, and the width of the word. Perfidy uses those numbers and nothing else from Ghost. No outline, spacing table or file from Ghost is in it.

The sources were chosen with the same specimen. About 90 open-license fonts were rendered with its letters and words, scaled to the same x-height and word width, and compared by the overlap of their letter shapes with the specimen's. Among the finalists, Merriweather Sans scored 0.625 for the upright letters, ahead of Mukta at 0.620 and Open Sans at 0.617, a lead of 0.005 that would not survive much of a recount. For the italic, Fira Sans scored 0.662 and Merriweather Sans 0.648, and Merriweather Sans' italic was used anyway: it comes on the same weight axis as the upright, so each italic matches its upright's weight, where Fira Sans has only fixed weights. The family's foundation rests on a near-tie in one score and a deliberate second place in the other.

How close did the build come? The finished fonts were measured on the same words as the targets. Across 34 weight-and-style samples, the median difference in stem thickness is 0.002 of the x-height, about a twentieth of the step between neighboring weights. The median difference in word width is 0.9%, but the mean is 2.5%, nearly three times the median, so a minority of samples miss by noticeably more than the typical one. The x-height of every family is 0.50 em; the specimen's measures 0.503.

Limits

The letter shapes are the sources', and only weight, size and spacing were calibrated. Where Ghost's letters differ from Merriweather Sans', Perfidy follows Merriweather Sans: its g has one storey where Ghost's has two, and its italic slants 7.5° where Ghost's measures about 10°. Perfidy Display, likewise, is Perfidy Text with tighter tracking. A real display cut redraws details for large sizes. This one does not.

Four styles lie past the end of a source's weight axis. Text Light and Display Light are extrapolated to 240 on a 300–800 axis, and SemiMono Light and SemiMono ExtraBold are extrapolated from iA Writer Quattro's 400–700 axis to 255 and 760. They were checked by eye at the sizes used here, and no type designer has reviewed them. Perfidy Mono's weights are Plex Mono's own, the nearest to each target, since Plex Mono has no weight axis; and because Plex Mono has no ExtraBold, Perfidy Mono stops at Bold.

The fonts are not hinted, so on Windows, text below about 11 px depends on antialiasing and is softer than in a hinted font. Perfidy Text covers Latin, including Vietnamese, but not Cyrillic, and has only the Greek letters used as symbols (Δ, Ω, δ, μ, π, ω); the mono and semi-mono fonts add Cyrillic. There is no variable-font build. Every weight is a separate file.

Sources

  1. Sorkin Type, Merriweather Sans, variable roman and italic (github.com/SorkinType/Merriweather-Sans), through the Google Fonts repository. SIL Open Font License 1.1, Reserved Font Name Merriweather.
  2. Information Architects, iA Writer Quattro, variable roman and italic (github.com/iaolo/iA-Fonts). SIL Open Font License 1.1, Reserved Font Name iA Writer; based on IBM Plex.
  3. IBM, IBM Plex Mono (github.com/IBM/plex), through the Google Fonts repository. SIL Open Font License 1.1, Reserved Font Name Plex.
  4. Xiangdong Zeng, Fira Math 0.3.4 (github.com/firamath/firamath). SIL Open Font License 1.1.
  5. Sharp Type, Ghost type specimen, version 1.0, 2026 (sharptype.co/typefaces/Ghost). The source of the target measurements only.
  6. SIL International, SIL Open Font License 1.1 (openfontlicense.org).
  7. fontTools (github.com/fonttools/fonttools): instancing, scaling, renaming and WOFF2 compression; HarfBuzz through uharfbuzz (github.com/harfbuzz/uharfbuzz): letter positions in the spacing figure.
  8. Will Robertson, unicode-math, for the LaTeX math setup (ctan.org/pkg/unicode-math).