Skip to content

Glyph customization modules

Each module defines one Customization subclass, listed in the order registered in CUSTOMIZATIONS.

customizations.comma

Comma: a straight, slightly tapered stroke instead of Roboto's hooked tail.

StraightComma

Bases: Customization

name = 'straight-comma' class-attribute instance-attribute

summary = 'Comma and semicolon: straight tapered tail in the style of JetBrains Mono' class-attribute instance-attribute

redraws = ('comma',) class-attribute instance-attribute

inherits = ('semicolon',) class-attribute instance-attribute

preserves = ('uni048A', 'uni048B', 'uni04C5', 'uni04C6', 'uni04C9', 'uni04CA', 'uni04CD', 'uni04CE') class-attribute instance-attribute

LEAN = 0.18 class-attribute instance-attribute

HEAD = LargerDots.SCALE class-attribute instance-attribute

TAPER = 0.74 class-attribute instance-attribute

redraw(font, style)

Keep Roboto's head center and depth; grow the head, straighten the tail.

Roboto scales the head width with the stem weight, and the semicolon places its comma by the center of the same head, so both stay aligned. The head grows with the period: it widens about its center, and its top rises as far as the period's. So it keeps its height relative to the period, from 23 units per 1000 em above it (Thin) to 50 below (Bold). The fonts compared end their commas level with their periods.

customizations.tittle

i and j: larger dots at a constant gap above the stem, shifted slightly left.

Tittles

Bases: Customization

name = 'tittles' class-attribute instance-attribute

summary = 'Dots on i and j: larger, at a constant gap above the stem, slightly left of center' class-attribute instance-attribute

DOTS = {'i': 1, 'j': 1, 'iogonek': 1, 'ij': 2} class-attribute instance-attribute

redraws = tuple(DOTS) class-attribute instance-attribute

inherits = ('uni0456', 'uni0458', 'uni1ECB') class-attribute instance-attribute

GAP = 0.11 class-attribute instance-attribute

SCALE = 1.15 class-attribute instance-attribute

OFFSET = 0.009 class-attribute instance-attribute

preserves = () class-attribute instance-attribute

redraw(font, style)

customizations.y_tail

y: a straight descender instead of Roboto's hooked tail.

StraightTailY

Bases: Customization

name = 'straight-y' class-attribute instance-attribute

summary = 'y: straight tail cut flat at the descender, as in JetBrains Mono and DM Mono' class-attribute instance-attribute

redraws = ('y',) class-attribute instance-attribute

inherits = ('yacute', 'ycircumflex', 'ydieresis', 'ygrave', 'uni1EF5', 'uni1EF7', 'uni1EF9', 'uni0443', 'uni045E', 'uni04EF', 'uni04F1', 'uni04F3') class-attribute instance-attribute

TOLERANCE = 4 class-attribute instance-attribute

preserves = () class-attribute instance-attribute

redraw(font, style)

Extend the right stroke straight down and keep both arms as drawn.

The outline is a v whose right stroke runs from the top-right corner down to where the hook starts, and whose left arm's outer edge meets that stroke at a junction. Everything between the junction and the hook start is the tail. It is replaced by a stroke with the top's width, parallel to the right edge, cut flat at the descender.

customizations.t_top

t: a taller stem above the crossbar.

TallerT

Bases: Customization

name = 'taller-t' class-attribute instance-attribute

summary = 't: stem raised to 86% of the way from x-height to cap height, as in JetBrains Mono' class-attribute instance-attribute

redraws = ('t', 'tbar') class-attribute instance-attribute

inherits = ('tcaron', 'uni0163', 'uni021B') class-attribute instance-attribute

HEIGHT = 0.86 class-attribute instance-attribute

preserves = () class-attribute instance-attribute

redraw(font, style)

customizations.brackets

[ and ]: longer arms, the same length in every weight.

LongerBrackets

Bases: Customization

name = 'longer-brackets' class-attribute instance-attribute

summary = '[ and ]: arms extend a constant 0.30 of the cell past the stem in every weight' class-attribute instance-attribute

redraws = ('bracketleft', 'bracketright') class-attribute instance-attribute

ARM = 0.3 class-attribute instance-attribute

inherits = () class-attribute instance-attribute

preserves = () class-attribute instance-attribute

redraw(font, style)

customizations.a_tail

a: a straight stem cut flat at the baseline instead of Roboto's spur.

StraightTailA

Bases: Customization

name = 'straight-a' class-attribute instance-attribute

summary = 'a: stem runs straight to a flat foot on the baseline, as in JetBrains Mono, DM Mono, and Source Code Pro' class-attribute instance-attribute

redraws = ('a', 'aogonek') class-attribute instance-attribute

inherits = ('aacute', 'abreve', 'acircumflex', 'adieresis', 'agrave', 'amacron', 'aring', 'aringacute', 'atilde', 'uni1E01', 'uni1EA1', 'uni1EA3', 'uni1EA5', 'uni1EA7', 'uni1EA9', 'uni1EAB', 'uni1EAD', 'uni1EAF', 'uni1EB1', 'uni1EB3', 'uni1EB5', 'uni1EB7', 'uni0430', 'uni04D1', 'uni04D3') class-attribute instance-attribute

MIN_FOOT = 0.85 class-attribute instance-attribute

preserves = () class-attribute instance-attribute

redraw(font, style)

customizations.at_bowl

@: an upright bowl on a straight stem, arching over into a ring drawn from O.

UprightAt

Bases: Customization

name = 'upright-at' class-attribute instance-attribute

summary = '@: an upright bowl on a straight stem, which arches over into a ring drawn from O, centered on the lowercase, as in JetBrains Mono, DM Mono, and Google Sans Code' class-attribute instance-attribute

redraws = ('at',) class-attribute instance-attribute

BOWL = 0.78 class-attribute instance-attribute

GAP = 0.5 class-attribute instance-attribute

MIN_GAP = 0.4 class-attribute instance-attribute

UPRIGHT = 0.04 class-attribute instance-attribute

inherits = () class-attribute instance-attribute

preserves = () class-attribute instance-attribute

redraw(font, style)

Draw @ as a bowl on a stem, inside a ring that grows from the stem.

Upstream, @ is a single-story a, slanted even in upright styles, whose tail curls out into a ring that sits on the baseline. Here, the stem is the ring's right side. It stands on a flat foot and holds d's bowl, round at the top and bottom where it meets the stem. Above the bowl, the ring is O's top half, over to its left side, which runs straight down beside the bowl. Below, it is O's lower left quarter, which runs flat into an upright cut under the stem's inner edge.

@ crosses the cell three times, as m does, so the stem and the ring's sides are as thick as m's stems, and d's and O's other strokes thin by the same fraction. The ring keeps upstream's width and top, and hangs as far below the baseline as it rises above the x-height, centered on the lowercase. The bowl is BOWL of the x-height tall, centered there too, and the ring's sides run straight from its bottom to its top. Across, the gap between the ring and the bowl is GAP of the counter's width.

customizations.percent

%: a full-height slash cut flat, instead of Roboto's short stroke.

FullPercentSlash

Bases: Customization

name = 'full-percent-slash' class-attribute instance-attribute

summary = "%: slash runs from the baseline to the cap height between the rings' outer corners, cut flat, as in JetBrains Mono" class-attribute instance-attribute

redraws = ('percent',) class-attribute instance-attribute

inherits = () class-attribute instance-attribute

preserves = () class-attribute instance-attribute

redraw(font, style)

Draw the slash corner to corner across the rings, keeping its thickness.

Upstream, the slash covers only the middle of the glyph, and its ends are cut square to the stroke. JetBrains Mono runs it from the baseline at the left of the rings to the cap height at their right, cut flat like /. Measured in upright coordinates, so italics are the upright design slanted, as in JetBrains Mono; their slash reaches a little past the cell, as several upstream italic glyphs do.

customizations.r_serifs

r: a flag at the x-height and a foot bar, drawn like Roboto's own i, and an arm that runs flat into an upright cut, like f's hook.

SlabR

Bases: Customization

name = 'slab-r' class-attribute instance-attribute

summary = "r: flag at the x-height and foot bar on the baseline, drawn like i's, and an arm that runs flat into an upright cut, as in IBM Plex Mono, DM Mono, and Geist Mono" class-attribute instance-attribute

redraws = ('r',) class-attribute instance-attribute

inherits = ('racute', 'rcaron', 'rcommaaccent') class-attribute instance-attribute

STEM = 0.1 class-attribute instance-attribute

FLAG = 0.75 class-attribute instance-attribute

FOOT = 1.25 class-attribute instance-attribute

MIN_SHOULDER = 0.8 class-attribute instance-attribute

preserves = () class-attribute instance-attribute

redraw(font, style)

customizations.currency_bars

$ and ¢: the bar runs through the glyph instead of stopping at its outline.

FullCurrencyBars

Bases: Customization

name = 'full-currency-bars' class-attribute instance-attribute

summary = '$ and ¢: bar runs through the glyph from top to bottom, as in JetBrains Mono, IBM Plex Mono, and DM Mono' class-attribute instance-attribute

COUNTERS = {'dollar': 2, 'cent': 1} class-attribute instance-attribute

redraws = tuple(COUNTERS) class-attribute instance-attribute

LEAN = 0.02 class-attribute instance-attribute

SLIVER = 8 class-attribute instance-attribute

inherits = () class-attribute instance-attribute

preserves = () class-attribute instance-attribute

redraw(font, style)

Run a straight bar between upstream's bar ends.

Upstream, the ends of the bar stick out above and below the outline but do not cross it. In $, they are 0.81 as wide as the stem of n in Regular. JetBrains Mono, IBM Plex Mono, and DM Mono draw their bars 0.50 to 0.83 as wide as their stems, the same in $ and ¢. Roboto's ¢ ends are as wide as the stroke of c, which would clog the counter the bar crosses, so ¢ takes the width of $'s bar.

customizations.g_spur

G: a stem cut flat at the baseline, with a spur where the bowl joins it.

SpurG

Bases: Customization

name = 'spur-g' class-attribute instance-attribute

summary = "G: stem runs straight down to a flat foot on the baseline, and the bowl joins it as d's does, as in IBM Plex Mono, DM Mono, and Geist Mono" class-attribute instance-attribute

redraws = ('G', 'G.smcp') class-attribute instance-attribute

inherits = ('Gbreve', 'Gcircumflex', 'Gcommaaccent', 'uni0120', 'Gbreve.smcp', 'Gcircumflex.smcp', 'Gcommaaccent.smcp') class-attribute instance-attribute

preserves = () class-attribute instance-attribute

redraw(font, style)

customizations.q_tail

Q: a straight tail cut flat, instead of Roboto's tail cut square to the stroke.

FlatTailQ

Bases: Customization

name = 'flat-tail-q' class-attribute instance-attribute

summary = 'Q: straight tail cut flat, ending under the right edge of the bowl, as in JetBrains Mono and DM Mono' class-attribute instance-attribute

redraws = ('Q', 'Q.smcp') class-attribute instance-attribute

ANGLE = 50 class-attribute instance-attribute

PARALLEL = 2 class-attribute instance-attribute

inherits = () class-attribute instance-attribute

preserves = () class-attribute instance-attribute

redraw(font, style)

customizations.zero_dot

0: a dot in the middle of the counter, instead of Roboto's slash.

DottedZero

Bases: Customization

name = 'dotted-zero' class-attribute instance-attribute

summary = '0: round dot in the middle of the counter instead of the slash, as in JetBrains Mono, IBM Plex Mono, and Source Code Pro' class-attribute instance-attribute

redraws = ('zero',) class-attribute instance-attribute

SCALE = 0.85 class-attribute instance-attribute

MAX_WIDTH = 0.6 class-attribute instance-attribute

BULGE = 1 class-attribute instance-attribute

STRAIGHT = 2 class-attribute instance-attribute

inherits = () class-attribute instance-attribute

preserves = () class-attribute instance-attribute

redraw(font, style)

Close the counter where the slash cut it, and put a dot in it.

Upstream, the slash cuts the counter in two, each half with a straight edge along the slash. Without those edges, the halves are joined on each side by a curve tangent to upstream's at both ends. The dot is the style's own period, scaled and centered in the counter.

customizations.punctuation_dots

Period, !, ?, ¡, and ¿: larger dots. The colon and semicolon follow.

FLAT = 2 module-attribute

SLIVER = 8 module-attribute

STRAIGHT = 0.5 module-attribute

LargerDots

Bases: Customization

name = 'larger-dots' class-attribute instance-attribute

summary = 'Period, colon, semicolon, !, ?, ¡, ¿: larger dots, as in JetBrains Mono, IBM Plex Mono, Source Code Pro, DM Mono, and Google Sans Code' class-attribute instance-attribute

MARKS = {'exclam': False, 'question': False, 'exclamdown': True, 'questiondown': True} class-attribute instance-attribute

redraws = ('period', *MARKS) class-attribute instance-attribute

inherits = ('colon', 'semicolon', 'exclamdbl') class-attribute instance-attribute

preserves = ('ellipsis', 'uni2025') class-attribute instance-attribute

SCALE = 1.15 class-attribute instance-attribute

MARK = 0.9 class-attribute instance-attribute

redraw(font, style)

period(glyph, style) classmethod

The larger period and how far its top rises, from upstream's.

It grows from the middle of its bottom, so it keeps its place on the baseline.

customizations.one_foot

1: l's foot bar under Roboto's flagged stem.

FootedOne

Bases: Customization

name = 'footed-one' class-attribute instance-attribute

summary = "1: l's foot bar on the baseline, under Roboto's flag, as in JetBrains Mono and IBM Plex Mono" class-attribute instance-attribute

redraws = ('one',) class-attribute instance-attribute

REACH = 40 class-attribute instance-attribute

inherits = () class-attribute instance-attribute

preserves = () class-attribute instance-attribute

redraw(font, style)

Run the stem down to the top of l's foot and add the foot.

Upstream, 1 is one contour standing on a stem cut flat at the baseline. The foot is l's, at the same place in the cell, so 1 and l line up in a column of code.

customizations.open_six_nine

6 and 9: a straight stroke from the bowl, instead of Roboto's curved one.

OpenSixNine

Bases: Customization

name = 'open-six-nine' class-attribute instance-attribute

summary = '6 and 9: straight stroke tangent to the counter, cut flat at the figure height and on the baseline, as in JetBrains Mono' class-attribute instance-attribute

redraws = ('six', 'nine') class-attribute instance-attribute

ANGLE = 60 class-attribute instance-attribute

SIDE = 10 class-attribute instance-attribute

BASE = 30 class-attribute instance-attribute

CORNER = 5 class-attribute instance-attribute

inherits = () class-attribute instance-attribute

preserves = () class-attribute instance-attribute

redraw(font, style)

customizations.flat_hooks

f, g, j, and t: hooks that run flat into an upright cut.

LEVEL = 4 module-attribute

FlatHooks

Bases: Customization

name = 'flat-hooks' class-attribute instance-attribute

summary = 'f, g, j, t: hooks run flat along the ascender, baseline, or descender into an upright cut, as in JetBrains Mono' class-attribute instance-attribute

HOOKS = {'f': ('ascender', True), 't': ('baseline', True), 'tbar': ('baseline', True), 'g': ('descender', False), 'j': ('descender', False), 'uni0237': ('descender', False), 'ij': ('descender', False)} class-attribute instance-attribute

redraws = tuple(HOOKS) class-attribute instance-attribute

inherits = ('tcaron', 'uni0163', 'uni021B', 'gbreve', 'gcircumflex', 'gcommaaccent', 'uni0121', 'uni0458', 'jcircumflex', 'uni01F0') class-attribute instance-attribute

MAX_OVERSHOOT = 0.03 class-attribute instance-attribute

STEM = 0.05 class-attribute instance-attribute

NOTCH = 0.1 class-attribute instance-attribute

preserves = () class-attribute instance-attribute

redraw(font, style)

flatten(glyph, style, line, top, right) classmethod

Run the hook flat along line into an upright cut.

Upstream, the hook leaves the stem, curves until it runs level just past line, and curls on into a cut square to the stroke. Both edges are cut where they run level, and the curves up to there move along the stem so that the outer edge lies on line. From there, both edges run straight to an upright cut where the hook reaches furthest. The stroke keeps its thickness where it runs level.

Built for t, in upright coordinates: the hook hangs below the stem and runs right. f is built upside down, and g and j mirrored. SlabR runs r's arm flat like f's hook; upstream, r's outer edge leaves the stem in a notch below the top of the stem and its arm ends in a sheared cut.

customizations.e_terminal

e: a terminal cut flat like c's, instead of Roboto's sheared one.

FlatTerminalE

Bases: Customization

name = 'flat-e' class-attribute instance-attribute

summary = "e: terminal turns upright into a flat cut as wide as c's, lower down, as in JetBrains Mono, Geist Mono, and DM Mono" class-attribute instance-attribute

redraws = ('e', 'eogonek') class-attribute instance-attribute

inherits = ('eacute', 'ebreve', 'ecaron', 'ecircumflex', 'edieresis', 'edotaccent', 'egrave', 'emacron', 'uni1EB9', 'uni1EBB', 'uni1EBD', 'uni1EBF', 'uni1EC1', 'uni1EC3', 'uni1EC5', 'uni1EC7', 'uni0435', 'uni0450', 'uni0451', 'uni04D7') class-attribute instance-attribute

HEIGHT = 0.8 class-attribute instance-attribute

LEVEL = 3 class-attribute instance-attribute

UPRIGHT = 8 class-attribute instance-attribute

JOIN = 16 class-attribute instance-attribute

preserves = () class-attribute instance-attribute

redraw(font, style)

Turn the terminal upright into a flat cut, drawn with c's curves.

Upstream, e's outer and inner edges curve up from the bottom of the bowl and stop, still leaning, at a cut square to the stroke. c's edges curve up from the bottom of its bowl until they run upright, into a flat cut. Here, each of e's edges is replaced, from the bottom of the bowl, by c's matching edge, stretched to end at e's new cut: at HEIGHT of c's, as wide as c's, and with its outer corner where upstream's terminal reaches furthest.