modus
Menu
On this page

The text of the system: a vector font with subpixel bands

The system draws its text with a vector font by default, with a coverage for each subpixel band. Spleen 8x16 is the fallback, and the other value of the setting font. The renderer adapts the ideas of a GPU font renderer to the design rules of this system: integers, a grid, and no work at run time that the build can do.

The terms are in Glossary: font, glyph, outline, coverage, subpixel band, font outlines, face, private glyph cache, grid fit, setting, settings page.

The idea in plain words. Each process draws each glyph of its text from the font outlines of the boot image, once, into its private glyph cache: a table of the coverage of each subpixel band of each glyph, in integers. Each later frame copies and blends from that cache, so drawing a text costs a few table reads per glyph. The boot image holds the outlines only, about 195 KB, and no drawn glyph. The principal changes the font in the process settings, and every window changes at once.

For whom. A reader who draws text in a process, and a reader who changes a font, the renderer or the setting.

The map of this guide. Sections 1 to 5: what a process does, the grid, the subpixel bands, fixed point, the glyph cache. Section 6: the font file and the candidates. Sections 7 and 8: the setting and the fallback. Sections 9 to 11: measures, gaps, open decisions. Section 12: the interface font and the text shaping module. Section 13: the glyphs past the glyph cache: the font outlines, the private glyph cache and the fallback chains. Section 14: the text rendering at any text size: the text size, the frame of a face, the rasterizer, the private glyph cache and its bounds.

The text of the system in the vector font; the process settings changes it to Spleen 8x16 and back while every window runs

1. What a process does

Nothing in its code. A process calls graphics.text, graphics.character, graphics.unsigned or the elements of src/library/modus/interface, src/library/modus/display opens the font outlines and gives the setting of the principal and the faces of the cells to src/library/modus/graphics when the process opens its window, and again at each change. Each window of the machine test draws with the vector font with no line of its own changed. Each display.present ends a frame of the text of the process: a process that draws by hand gets its glyph memory there, after its first glyph.

Two places draw large text directly: write_large in server, which calls graphics.text_scaled at a whole scale of the body, and text_draw in src/library/modus/interface, which calls graphics.text_sized at the text size of a record. The boot display (src/library/modus/bootscreen) draws every text in Spleen at the size of its scale, and reads no font file (The boot display at the scale of the screen in the repository). The large of scheduler writes a text record with a text size through interface.draw_text, so the package draws it; terminal has no large text of its own. They do not read the bitmap of Spleen directly: a process that uses the interface of the text needs no change for the vector font.

2. The grid

The font must fit the grid of the system: every layout was made for cells of 8 x 16 pixels. So the font of the cells is scaled until its advance is exactly 8 pixels, and each glyph stays inside its cell.

A text grid is laid out in cells of 8 x 16 pixels, and the spacing tokens of the design rules are multiples of 8 (The design rules: Text and The design rules: Spacing). The vector font lives on these cells:

  • The default font is monospace. Its advance maps to exactly 8 pixels at scale 1: the scale of the outline is 8 / advance, the same on both axes. A line is 16 pixels. Each existing layout holds; no window changes its size.
  • The scales 2 and 3 are real sizes: 16 x 32 and 24 x 48 pixels, each drawn from the outline at that size, not enlarged pixels. The large numbers of scheduler, remote, terminal and server gain the most.
  • Spleen as the fallback is enlarged: the rule "no enlarged low-resolution font" holds for the default font. When a process has no valid font outlines, or when the principal chooses Spleen in the settings, Spleen draws each of its pixels as a square at the scales 2 and 3: the other choice at that moment is no large text.
  • Every glyph is drawn by its process. Each character comes from the face of its text and its fallback chain, drawn by the process itself from the font outlines of the boot image into its private glyph cache, once, at the size of its text (sections 13 and 14).
  • A glyph is cut to its cell. The ink and the color fringe of a glyph stay inside its cell of 8 x 16 (or 16 x 32, 24 x 48). A cell never draws into its neighbour: the terminal fills one cell and draws its character, and the damage by difference of src/library/modus/interface takes the rectangle of a text record as all that it draws. A glyph that passes its advance (rare in a monospace font) loses that part.
  • The baseline puts the middle of the ink of the characters 33 to 126 at the middle of the cell (vector_font.glyph_style_of). For JetBrains Mono at scale 1 it is row 12, the baseline of Spleen.

Grid fit (the hinting of this system)

No TrueType bytecode interpreter: the subsets have no instructions. In place of it, a light grid fit of the vertical metrics, with the flag FLAG_GRID_FIT of the cache:

  • the baseline is on a whole pixel (the origin of the cell);
  • the x-height (the top of x) and the cap height (the top of H) go to the nearest whole pixel; the points between 0 and the x-height scale to it, the points between the x-height and the cap height scale between the two, the points above the cap height and below the baseline keep the plain scale (vector_font.place_y).

Why: at 13 to 14 pixels to the em, the tops of the lowercase letters and of the capitals fall between two rows without it, and a row of half coverage under each top makes the text soft. The fit moves the tops onto rows, so the horizontal stems of n, e, t, E, H are sharp. The vertical stems need no fit across: the subpixel bands place them in thirds of a pixel. Not done: a fit of each stem (it needs the stems of each glyph: an outline analysis or the instructions of the font).

The picture build/fonts/candidates.png (modustool vector_fonts) has the default font with and without the fit; the default is with it. The default value is an open decision (section 11).

3. Subpixel bands

A pixel of a usual screen is three thin stripes: red, green and blue. Drawing each stripe on its own triples the resolution across, so the stems of the letters can sit at a third of a pixel. The cost is a faint color at the edges, which a filter keeps small.

  • Coverage at 3 samples for each pixel across, one for each color stripe of the screen: the outline is drawn into an accumulation three times wider than the cell, with a margin of 6 thirds on each side.
  • The filter: each third spreads over its neighbours with the weights 8, 77, 86, 77, 8 of 256 (the default filter of the usual LCD rendering), so that a side of a stem does not show one color alone. Measured on a stem of one pixel at its three places of a third (host test filters_measured): the five taps give a fringe of at most 162 of 255 and a peak of 239; three taps (85, 86, 85) give 170 and 255; no filter gives 255 and 255. The five taps are chosen: the least fringe for a loss of 16 levels at the peak.
  • The words of the cache: for each pixel one word 0xGGRRGGBB: the coverage of the red, green and blue stripe after the filter, red at the left, and in the high byte the coverage of the whole pixel (the mean of its three thirds before the filter) for grayscale.
  • The order of the stripes is a setting: rgb (the default), bgr (the same words with red and blue swapped at the blend: exact, the same thirds), none (grayscale, the high byte). Under QEMU the screen of the host decides: the pixels of the machine go to a window of the host, whose own panel has its own order; most panels are RGB.
  • Text over a gradient or a picture: the blend reads the pixel under each covered pixel; nothing assumes a plain background.
  • Colored text: the coverage of each channel times the color of the text, in linear light.

The blend in linear light

graphics.blend_coverage_row (in src/library/modus/graphics/blend.odin, beside blend_premultiplied_alpha of the pointer pictures: one family, one head comment): for each channel, with d the pixel under, c the color of the text and a the coverage of that channel,

result = sqrt((d * d * (255 - a) + c * c * a) / 255)

A gamma of 2 in place of the curve of sRGB, in integers: the sum is under 2^24, shifted right by 12 bits it indexes a table of 4096 square roots that each process makes once (4 KiB). A channel with coverage 0 keeps the pixel, 255 gives the color.

The error against the exact curve of sRGB (host test blend_error_against_srgb, each coverage 0 to 255):

Text overGamma of 2No gamma (a blend of the encoded values)
colors.text over colors.card_bottom8.5 levels at most51.0 levels
colors.dim over colors.background4.227.2
colors.process over colors.card_top7.440.3
colors.background over colors.text8.954.9

Light text on a dark surface is the case of this system: a blend with no gamma makes each edge pixel up to 51 levels too dark, and the text looks thin.

What a screenshot shows

A picture of the screen holds the colored edges of each glyph: enlarged, each letter has orange and blue sides. This is the subpixel band at work, not a fault: on an RGB panel at its native size the three stripes of a pixel make the edge. The pictures of docs/screenshots are taken with the order rgb. The setting none gives gray edges, for a picture to read enlarged or a screen with no stripes in rows (a turned screen, many OLED panels).

4. Fixed point

The renderer uses integers only, so the same font gives the same bytes on every build and every host. This section says how the coverage stays exact with integers, and why no sum can overflow.

src/library/modus/vector_font/raster.odin has no floating point, and neither has the text path of a display (src/library/modus/graphics, src/library/modus/display):

  • Coordinates in subunits: 256 to a pixel on each axis (24.8). The points of an outline are integers in units of the font; the placement maps them with rational numbers rounded to the nearest subunit (divide_rounded).
  • Accumulation in i32: a piece of a segment of height h with ends at ra and rb subunits from the left of its column adds h (512 - ra - rb) to its cell and h (ra + rb) to the next; a full pixel is 256 x 512 = 131 072. The overflow argument: a segment adds at most one full pixel to a cell of a row, and a glyph has at most 8192 segments (a segment past that is dropped), so a cell and a prefix sum stay under 2^30.
  • Cuts: a segment is cut at each row and each column; the place of a cut is a function of the segment and of the line of the cut only, so two pieces that meet share their point. The sum of the coverage of a closed outline is exactly the area of the polygon of its cut points.
  • Exactness (host test coverage_is_the_area): a rectangle at positions that are not on a pixel, triangles with edges at an eighth of a turn and the whole accumulation give a sum of coverage equal to their area, to the unit. Twelve convex polygons with edges at other angles: at most 0.000029 of their area apart (the rounding of the cut points).
  • The edges of the accumulation: what is left of it lies on its left side, what is right of it on its right side, so the coverage inside stays exact; a row has one cell more for a piece on the right side of the last column. Host test the_last_column: a vertical edge exactly on the right side of the last column with widths 1, 2 and 3, and an outline that passes all four sides.
  • Quadratic curves are cut into 1 to 16 segments, so that each is at most 1/8 of a pixel from the curve; each point is computed from the ends and the control point, rounded: no error adds up along a curve.
  • The result does not depend on the build: integers only; the host test golden_cells_of_a_candidate (src/library/modus/vector_font) draws the cells of the characters of ASCII of JetBrains Mono at the scales 1, 2 and 3 two times, compares the hash of the rows with ink and their words of each scale with a constant, and checks that one changed word changes the hash of its scale. A change of the renderer changes these hashes: it needs a new RENDERER_VERSION and new constants. The faces of the system have golden hashes of their own (section 14.5).

5. The glyph cache

The glyph cache was a file of the font already drawn: each character at each scale. It left the system. The five caches of the boot image, more than 1.3 MB, left first: each process draws its glyphs from the font outlines into its private glyph cache (section 14). The file, its builder and its fuzz target left after: the candidate fonts (vector_glyphs, build/fonts/candidates.png) draw through the face of the cells of a font set of their own (section 6), and the tests of the blend take their glyphs from a face, whose golden hashes prove the pixels (section 14.5). The character index stays, in the contract src/library/modus/contract/font_characters. This section and "Who can write a cache" record the form that the caches had: the font outlines follow the same rules today.

A table of drawn glyphs: for each scale (1, 2, 3) and each character of two ranges and a list: ASCII 32 to 126, the Latin-1 Supplement U+00A0 to U+00FF, and the added characters (Glossary: Added character), today the euro sign U+20AC. Each table keyed a character by its character index (Glossary: Character index): 0 to 94 for ASCII, 95 to 190 for the Latin-1 Supplement, 191 for the euro sign. Its format, version 4 of a contract that left with it: a header of 128 bytes, a size entry of 16 bytes for each scale, a glyph entry of 12 bytes for each character, position and scale, the advance of each character and scale, the pairs of each scale by character index, then the words; a glyph keeps only its rows with ink. Fixed capacity: 3 sizes, 192 characters, 3 positions, 36 864 pairs. A cache holds the 192 characters, no fewer: the build refuses a font that lacks one. A text is UTF-8; each character outside the cache, and each invalid sequence, draws the replacement glyph, which code draws and no cache holds (Glossary: Replacement glyph). All zero is valid: a process with no cache draws Spleen.

One format for the two kinds of font (section 12.4). The tool writes every cache again at each build, so no reader keeps an older version:

A monospace cache (Paper Mono)A proportional cache (B612)
Positions of each scale13 at scale 1, 1 at the scales 2 and 3; 3 for the bold weight at scale 1
A glyphits full cell: left 0, width the width of the cellthe box of its ink: left from the origin (it can be negative), width its columns
The advance of each characterthe width of the cell, in 1/64 of a pixelthe advance of the font, in 1/64 of a pixel
Pairsnonethe pairs of kern between two characters of the cache, in 1/64 of a pixel, sorted

validate checks each new part as hostile input, as the rest: the positions (1 to 3), the first glyph of each scale (after the glyphs of the scale before), the width (at most 64) and the left side (-16 to 64) of each glyph with its words inside the file, each advance (0 to 64 pixels), and each pair (two characters of the cache, sorted with no pair twice, at most 64 pixels). The draw of a glyph reads left and width of the glyph in place of the width of the cell: the same pixels for a monospace cache. The private glyph cache keeps this form of a glyph (text_rendering.Glyph_Entry). The header says which kind of cache it is: FLAG_PROPORTIONAL. A cache with no such flag is monospace, and validate requires its form: one position, no pair, each glyph with left 0 and width at most the width of the cell, each advance the width of the cell; the damage of a grid of text cells depends on a glyph that stays in its cell. validate also refuses a flag that it does not know, a filter past the three of src/library/modus/vector_font, and a font name that is not printable bytes with a zero byte at its end. The modus tool validates each cache that it writes, monospace or proportional.

Who can write a cache

Each process validates its glyph caches once, then the drawing code reads the counts and the offsets of a cache again at each glyph, with no bounds check. So the bytes of a cache must not change after validate, and the place of a cache must not be a choice of another process. Both hold:

  • The address of each cache is a fixed range (src/library/modus/contract/fixed_addresses), a constant of the process. It is not read from the settings page.
  • Mapped or not: the value 20 of the context (CONTEXT_VALUE_FIXED_RANGES_MAPPED) is a set of bits, one for each fixed range. The root service sets the bit of each cache that it maps, and only then. A process reads nothing at a range whose bit is clear (settings.glyph_cache_open gives Not_Mapped), so a process never reads a range where nothing is mapped.
  • The size of each cache is in its own header: file_size. validate_at of the contract of the cache read the header at the fixed address, refuses a size under the header or over the span of the range, then validates the whole file, which checks file_size again. The header is always mapped: a mapping has whole pages, and the root service gives a cache only when validate accepts the bytes of the resource, so the resource is never shorter than its header and its header states the size of the resource. The modus tool validates each cache that it writes. No size goes through the context. The address and the size are not fields of the settings page. The process settings writes that page: with them, it could point every later process at memory that it controls, and change that memory after the validation.
  • The bytes: the root service maps each cache from the boot image with no flag, so with the right Read only, for every process that receives it, the process settings and the compositor included (text_settings_give). The one handle of the boot image, which the kernel gives the root service, has the rights Read and Give and no right Write (src/modulus/main.odin). So no process, the root service included, writes the bytes of a cache after the root service checked their hash. The limit of this rule: a process trusts its starter. A starter writes the values of the context of its child and chooses its mappings, so a starter that maps memory that it keeps with Write at a fixed range of a cache could change it after the validation. It gains nothing that it does not have already: it chooses the grants, the display ring and the budget of its child. A starter can also lie about a range: a set bit with no mapping, or a mapping shorter than the size that the header states, makes its child fault at its first read there. The root service is the starter of each process with a surface, and it gives each cache read-only from the boot image, with its bit, after validate accepted it; the other starters (the console, errors, locks, ...) give no settings page and no cache.
  • The font outlines follow the same rule. The root service maps them read-only from the boot image after it checked their hash and their format, and a process validates their header once (section 13).
  • What settings still chooses through the page, and the worst that each field does to another process:
FieldIts worst valueWhat it does to another process
values[font]any numbera value that the setting does not have refuses the whole page (settings.choice_of_values): each reader takes the defaults, as for a page that never stays stable, and the root service and the process date act on nothing. Else the vector font or Spleen, a look
values[subpixel_order]any numberthe same refusal; else one of three orders of the stripes, a look
values[pointer_theme]any numberthe same refusal; else one of the two theme files that the compositor validated, a look
values[grid_fit]any numberthe same refusal; else one of the two caches that the process validated, a look
values[keyboard_layout]any numberthe same refusal, which gives the layout of the United States; else the input service gives each key the character of one of its two layouts
values[appearance]any numberthe same refusal; else one of the three values, a look
appearance_in_forceany numbera word that names no appearance in force refuses the whole page, as above
values[6..7]any numberno reader
zone_offset_minutesany numbera zone that is not from -720 to +840 by 15 reads as 0, UTC (settings.zone_offset_minutes_valid). The process date copies the zone into the date page: the bar shows another local time, and auto takes the other appearance. A look, and the hour that the bar shows
change_countodd for ever, or changed with no enda reader gives up after 64 reads and takes the defaults (settings.read). The compositor tells the windows only when the values differ from the values that it told last (settings.values_differ): a new count with the same values sends no record into the ring of a window, which also carries its keys. Values that change with no end make the windows draw again: a cost of time, which the process settings also pays
reservedany numberno reader

Where it lives: three places weighed

In each process, at run timeShared, filled at run time by a serviceBuilt by the modus tool, a resource of the boot image
The time to fill ASCII 32 to 126 at 3 scales3.7 to 4.0 ms for each process (measured by vector_glyphs for each candidate)The same, once0 at run time; the same work once in the build
Memory390 624 bytes in each process (JetBrains Mono)One copy, shared read-onlyOne copy: the pages of the boot image, mapped read-only
The font file at run timeIn each process (14 to 21 KB)In the serviceNone: the system draws from the cache only
Property 11The cache is not a fact of the system descriptionThe sameThe cache is a function of the font file (its BLAKE3 in the header) and of the renderer version; the boot image names it by its hash
Hostile inputEach process reads the font fileOne service reads itThe modus tool reads it at build time; each process validates the cache once (one pass over its tables, 7 us in root)

Chosen first: built at build time, a resource of the boot image. It served three sizes only, and the scale factor of the screen needs the sizes between them. Chosen now: in each process at run time, with a private glyph cache that keeps each glyph once drawn, at any size, and the font outlines as the one resource of the text (sections 13 and 14; Text rendering: one module for text at any size: The glyph caches of the boot image and the demand cache: removed in the repository). The root service no longer checks the hash of five caches at start (796 to 966 us for 390 624 bytes, about 3 ms for all), and the boot image is more than 1.3 MB smaller. The first frame of a window draws its glyphs once.

vector_glyphs opens each candidate as the font of the cells of a font set of its own (text_rendering.font_file_open), and draws it through the face of the cells of that set (graphics.character_of_set): the rasterizer and the blend of the text of the system, with no glyph kept. The time of the open of each candidate is on its log.

The cost of a text draw

Measure (machine test, the least of 50 batches)The fixed-point rendererThe floating-point prototype
One glyph of Spleen 8x1635 ns30 ns
One glyph from the glyph cache, scale 1309 ns
One glyph from its outline, in fixed point, with the stripes: scale 1 / 2 / 33 874 / 10 607 / 20 613 ns5 373 ns at 13 px

On the host (glyph_draw_cost, which now draws the glyphs of the face of the cells from their words): 333 to 362 ns from the glyph cache, before it left, against 33 to 44 ns for Spleen. The target was "the same order as Spleen": a glyph from the cache costs 9 times a glyph of Spleen. Four changes brought it from 921 ns: a loop for each order of the stripes (a constant), no bounds check after the one validation of the cache, the squares of the pixel under kept from one pixel to the next, a shift in place of a division. What stays: about 40 pixels of a glyph have a partial coverage, and each needs three blends in linear light. Section 9 has the effect on whole frames, which is small.

Where the time goes, and the fast blend

Measured on the host, where the same code runs, with -o:speed, pinned to one core with taskset, each number the least of 3 000 batches of the line compositor 12.4 ms 2 418 pages {fill} [rings] gi Rb 0O 1lI (60 glyphs), and the least over four cores (host test text_speed_parts, src/library/modus/graphics/text_speed_test.odin). Each batch draws over a fresh background, outside the time.

  • The words of one cell (128 pixels at scale 1), on the mean: 64.4 pixels in rows with no ink (never read), 19.2 words of zero coverage (skipped), 1.0 word of full coverage (a store), 43.4 words of partial coverage. So the time is in the partial pixels: each needs three blends in linear light (two squares, a sum, a shift and a load of the table of square roots for each channel). A walk over the words alone costs 11.2 ns a glyph.
  • The fast blend (graphics.blend_glyph_rows, in blend.odin): for one text color over one pixel color, each channel of the result is a function of its coverage only. A blend table keeps the 3 x 256 results for one pair, in the memory of the process (Blend_Tables: 8 tables, 24 KiB, replaced in turn; a value is computed on first use with the formula of the reference, and a new table clears nothing: it takes a new generation in the high byte of each value). The choice is made for each row of a glyph: a row whose two end pixels have one color takes the table of that color, each pixel of that color in the row is three loads and a store; any other pixel takes the reference blend. Bit for bit: the host test fast_blend_is_the_reference draws each character at each scale, each order of the stripes, five colors, over a flat color, the gradient of a card, a gradient across and noise, two passes (the second over the first), and compares with the reference: 0 pixels differ. A row that no table holds (its two ends differ: a gradient across, a picture) takes the form of the target, blend_coverage_row_in_form_of_target (SSE2 on amd64), not the scalar form; a lone pixel of another color inside a row stays scalar (the SSE2 form gives a lone pixel to the scalar form anyway). The host test three_blends_give_the_same_bytes_for_each_face compares the table blend, the SSE2 form alone and the scalar form alone, byte for byte, with the glyphs of the faces Cells (Paper Mono), Cells_Bold (Paper Mono SemiBold) and Interface (B612, glyphs that overlap), at the scales 1, 2 and 3 and each position, over the four backgrounds. The tests of the blend take these glyphs from the face, copied out of the private glyph cache (src/library/modus/graphics/face_glyphs_test.odin). The host test text_speed_of_each_blend gives the time of one glyph in each of the three, over a flat color, a gradient across and noise, for the choice of one path for the flat case; it has not run on a quiet host yet. The expectation: the table blend stays faster over a flat color, because a partial pixel there is three loads from a table where the SSE2 form still takes the square roots one channel at a time; if the SSE2 form comes within about 10 % of it, one path (the SSE2 form) is better than two, and the blend tables (24 KiB for each process) go.
  • Not taken: a run-length or a mask for each row in the cache (the zero words are skipped already, and the walk is 11 ns of 109); 16 bytes at a time (the partial pixels need three table loads each, which the processor does not gather); the tables filled whole when made (89 to 93 ns against 103 to 110 ns, but 768 square roots for each new pair of colors, which a gradient across pays at each row).
One glyph, the least on the hostScale 1Scale 2Scale 3
Spleen 8x16 (at scale 2 and 3: its pixels enlarged)33.8 ns253 ns286 ns
The reference blend, over a flat color181 ns424 ns712 ns
The fast blend, over a flat color (the console, the cards)109 ns285 ns497 ns
The fast blend, over the gradient of a card (top to bottom)110 ns
The fast blend, over a gradient across (a title bar)178 ns (the reference: 188 ns)
The fast blend, over noise (a picture)188 ns (the reference: 193 ns)

At scale 1, a glyph from the cache over a flat color or a card costs 3.2 times a glyph of Spleen (5.4 times with the reference blend). At the scales 2 and 3 the vector font costs 1.1 and 1.7 times the enlarged Spleen, for a glyph drawn from its outline at that size. The rest of the time is the 43 partial pixels: a cell has 43 blends that Spleen does not do. The target "the same order as Spleen" is near at scale 1 and met at the scales 2 and 3; the machine measures of this part were taken at a load of 28 to 31 and are not valid.

The blend of a glyph now has an SSE2 form beside this scalar form, with the same bytes: Vector forms: SSE2: The blend of a glyph (src/library/modus/graphics) and Vector forms: SSE2: How to measure on the machine, says what it computes in vectors and how to measure it against the numbers above.

6. The font file

The font of the cells must be monospace, have clear forms at 8 x 16 pixels, and have a license that allows a subset inside the system. Six candidates were read and compared; Paper Mono is the font of the system.

Six candidates, each read from the build input of flake.nix (the packages of nixpkgs, pinned by flake.lock). Their license texts were read at the source on 2026-11-11.

CandidateLicense, as readOutlinesSourceASCII subsetGlyphs made of glyphs
JetBrains Mono 2.304SIL OFL 1.1, no Reserved Font Name: "Copyright 2020 The JetBrains Mono Project Authors [...] This Font Software is licensed under the SIL Open Font License, Version 1.1." (github.com/JetBrains/JetBrainsMono/OFL.txt)glyf268 544 bytes14 164 bytes4
DejaVu Sans Mono 2.37Bitstream Vera license, DejaVu changes in the public domain: "The Font Software may be modified [...] only if the fonts are renamed to names not containing either the words "Bitstream" or the word "Vera"." (github.com/dejavu-fonts/dejavu-fonts/LICENSE)glyf343 09617 6880
IBM Plex Mono 1.1.0SIL OFL 1.1 "with Reserved Font Name "Plex"" (github.com/IBM/plex/LICENSE.txt): the subset is named "IBM Mono ASCII"glyf155 94015 2243
Fira Mono 3.2SIL OFL 1.1: "Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A." (github.com/mozilla/Fira/LICENSE); the name table of the file: "Licensed under the Open Font License, version 1.1 or later"glyf174 63213 4240
Commit Mono 1.143The name table of the font file: "This Font Software is licensed under the SIL Open Font License, Version 1.1"; the repository (github.com/eigilnikolajsen/commit-mono/LICENSE): MIT. The two differ; the subset keeps the text of the fileglyf377 98013 0240
Iosevka 34.3.0SIL OFL 1.1, no Reserved Font Name: "Copyright (c) 2015-2026, Renzhi Li" (github.com/be5invis/Iosevka/LICENSE.md)glyf, a collection of 18 faces (the first is read)50 041 35620 9445
Source Code Pro 2.042SIL OFL 1.1 "with Reserved Font Name 'Source'" (github.com/adobe-fonts/source-code-pro/LICENSE.md)CFF only in nixpkgsnot made
  • A glyph made of glyphs is read with two limits: at most 4 levels (COMPOSITE_DEPTH) and at most 64 parts in all its levels together (COMPOSITE_PART_LIMIT). A part can be an empty glyph, which adds no point, so the limit of points does not bound the work: with no limit of parts, a glyph of 21 000 parts in four levels gives 21 000 to the power 4 calls. The host test a_composite_of_many_empty_parts_ends_at_once builds that glyph. The composites of the candidates have 2 parts. A face number past the faces of a collection is the problem No_Face.
  • CFF (Source Code Pro): its outlines are Type 2 charstrings, a small stack machine with cubic curves. The reader needs that interpreter (about 40 operators, subroutines, hints to skip) and the cut of cubic curves. Not built: five candidates have glyf.
  • A subset is a Modified Version of the font under the OFL (OFL FAQ 2.6: "Removing any parts of the font [...] is considered modification. This is permitted by the OFL but would not normally allow the use of RFNs."). So a font with a Reserved Font Name is renamed in its subset ("IBM Mono ASCII"). Each subset keeps the copyright and the license text of its source in its name table and in a .license file beside it; resources/fonts/OFL.txt and BITSTREAM_VERA_LICENSE.txt have the full texts.
  • The subset command: modustool vector_fonts reads VECTOR_FONT_SOURCES (the development shell sets it), writes for each candidate .notdef, the characters 32 to 126, the characters U+00A0 to U+00FF and the added characters as simple glyphs with no instructions (a glyph made of glyphs, as é, is made simple with its offsets and its scale in integers), in the order of their character index. A font that lacks U+00A0 (the space with no break) or U+00AD (the soft hyphen) draws it with the glyph of U+0020 or U+002D, its standard equivalent, and the command writes one line for each such character ("paper_mono has no glyph for U+00AD: its subset draws it with the glyph of U+002D"); Paper Mono has no soft hyphen. Each other character that a font lacks stops the command, the euro sign too: a glyph of E or C would show a wrong currency. Each source font of the system has its own glyph for U+20AC. The command writes the tables OS/2 (of the source), cmap (two segments of characters, one segment for each added character, and the last segment of the format), glyf, head, hhea, hmtx, loca, maxp, name, post, with their checksums. It uses no time and no random value: the same input gives the same bytes. The subsets are in the repository, as the output of modustool font is: a build needs no build input.
  • A wider range costs at most 4 bytes for each pixel of a cell, at three scales: 4 x (8 x 16 + 16 x 32 + 24 x 48) = 7 168 bytes for each character with ink in each row; about 4 100 bytes for each character on the mean with only the rows with ink. The 96 characters of the Latin-1 Supplement are in each cache: an estimate of about 390 KB more for each cache of three scales before the build; the coordinator of the build measures the sizes in build/fonts.

JetBrains Mono is the reference font of the host tests of the renderer. The default font is one line, DEFAULT_VECTOR_FONT in tools/modustool/resources/vector_fonts.odin. The qualities of JetBrains Mono: at 8 x 16 its zero has a dot and its O does not, 1, l and I differ, its x-height (550 of 1000) gives 7 rows like Spleen, its stems are even at the three scales, and the OFL with no Reserved Font Name lets the subset keep its name. DejaVu Sans Mono is close; Iosevka has the largest letters (its advance is half its em, so its em is 16 pixels) and the most condensed forms; Fira Mono is the heaviest; IBM Plex Mono needs a new name.

Paper Mono, the font of the system

Paper Mono (<https://github.com/paper-design/paper-mono>, SIL OFL 1.1, no Reserved Font Name: "Copyright 2025 The Paper-Mono.Git Project Authors [...] This Font Software is licensed under the SIL Open Font License, Version 1.1", read in OFL.txt of the repository; its name table says the same) is the default vector font: the font of the cells, for the console, the terminal and the values of every window (section 12.6). Its SemiBold is the bold weight of the titles in the font of the cells. DEFAULT_VECTOR_FONT is paper_mono, EMPHASIS_VECTOR_FONT is paper_mono_semibold. JetBrains Mono stays a candidate; the host tests of the renderer keep it, so that a change of the default changes no golden hash.

The cap height and the x-height of Paper Mono (the pinned files, both weights): OS/2 gives 710 and 509 units, and the tops of the outlines of H, E, F, T, Z, I are all 710, of x, z, v, w all 509. So the path of the monospace fonts, which takes them from the tops of H and x, gives the values that the font states.

The source: Paper Mono is not in nixpkgs. flake.nix fetches fonts/ttf/PaperMono-Regular.ttf and PaperMono-SemiBold.ttf at the commit 74fc5537cc1f7b39aa8cccfa7dd3822e17143cca, each with its hash (106 088 and 106 900 bytes).

The zero of Paper Mono: the slashed zero. The default zero of Paper Mono looks like its capital O, so the system draws the slashed zero. What the pinned files hold, read in their tables:

Paper Mono RegularPaper Mono SemiBold
The glyph of '0' in cmap294: 2 contours, 24 points (the capital O, glyph 78: 2 contours, 24 points)294: 2 contours, 26 points
The feature zero of GSUBlookup 158: type 1 (a single substitution), one subtable of format 1 (a delta of 10), a coverage of format 1 with one glyph, 294the same
Its substitute304, named zero.zero in post: 3 contours, 32 points, the advance 606 of every glyph304: 3 contours, 32 points
The other forms of the zeronumr 335, dnom 325, sinf and subs 356, sups 366; the stylistic set ss01 reaches the zero through a contextual lookup (type 6) onlythe same

The script DFLT and the script latn each have the feature zero in their default language system. So the slashed zero is the feature zero, a single substitution, and no stylistic set and no name of post is needed to find it.

  • The subset: the table of the fonts of the tool (vector_fonts.odin) gives each font a form of the zero, .Of_The_Font or .Slashed. For .Slashed the tool reads the feature zero with vector_font.single_substitution and draws its substitute for the character '0' in the subset; the subset holds no GSUB. A font with no such feature keeps its zero, and the tool prints a line that says so. Paper Mono Regular and SemiBold are .Slashed; the .license file of a subset says which glyph is its zero.
  • The reader of GSUB (src/library/modus/vector_font/substitution.odin) reads the version (1.0 or 1.1), the script list (DFLT, else latn, its default language system), the feature list, the lookup list, a lookup of type 1 or 7 (an extension that holds a type 1), a subtable of format 1 or 2, and a coverage of format 1 or 2. It is hostile input: each offset is checked against the table, the work is bounded (16 features of one tag, 64 lookups, 64 subtables, a binary search in each coverage), and the substitute must be a glyph of the font.
  • The tests: the_zero_feature_of_paper_mono (the modus tool) reads both pinned files through VECTOR_FONT_SOURCES, which the check of the flake also sets; the_zero_of_the_paper_mono_subsets reads the subsets; a_single_substitution_in_each_form and a_damaged_substitution_table build a table GSUB in memory.
  • The effect: every picture with a 0 in the text of the system shows the slashed zero. The golden hashes of the renderer are of JetBrains Mono, which keeps its zero: they do not change.

What its tables say, read on its files, against JetBrains Mono:

Paper Mono Regular and SemiBoldJetBrains Mono
Outlinesglyf (TrueType), 800 glyphsglyf
Units for one em10001000
Advance of each ASCII character606: one for all, monospace600
The scale on the grid of 88 / 606: an em of 13.2 pixels8 / 600: 13.3 pixels
Ascender, descender (hhea, also the typo values of OS/2)955, -2451020, -300
Ink of ASCII 33 to 126, top and bottom803, -194: 13.2 pixels of height, in 16 rows
Baseline (glyph_style_of)row 12: the ink from about row 1.4 to row 14.6row 12
x-height, cap height509, 710: 6.7 and 9.4 pixels; the grid fit gives 7 and 9 rows550, 730: 7 and 10 rows
Glyphs of ASCII made of glyphsi and j (a stem and the dot glyph 559, placed by x and y offsets, flags ROUND_XY_TO_GRID and USE_MY_METRICS): the reader takes them, and the subset makes them simple4
Pair spacingGPOS only (3.9 KB), no kern: a monospace font on the grid uses noneGPOS
Box drawing U+2500 to 257F, block elements U+2580 to 259Fall 128 and all 32
  • Its capitals are one row shorter than those of JetBrains Mono at scale 1 (9 rows against 10) and its letters are 1 % narrower in the em. Its line is the same 16 rows.
  • The box-drawing characters of Paper Mono, its block elements and its five Greek letters are in its subset past the 192 characters, and each window draws them (section 13).
  • build/fonts/candidates.png and the picture font_candidates show it beside the others.

The picture of the choice: font_candidates (the process vector_glyphs: the same line in Spleen and in the six fonts, the large number at scale 2, a word enlarged 4 times), and build/fonts/candidates.png (modustool vector_fonts: the same lines at scales 1, 2 and 3 in each candidate and in Spleen, the default with and without the grid fit, a word of each enlarged 5 times; drawn on the host by the same src/library/modus/graphics). Each draws a candidate through the face of the cells of a font set that holds that candidate as its font of the cells (text_rendering.font_file_open, graphics.character_of_set): the rasterizer, the grid fit and the blend of the text of the system, as if the candidate were the font of the system. No glyph of a candidate is kept: each is drawn band by band at each draw.

A bold weight for the titles

The titles of the cards (the card of src/library/modus/interface) are drawn in the emphasis weight of the font of the system: Paper Mono SemiBold (resources/fonts/paper_mono_semibold.ttf; Paper Mono has no Bold). The SemiBold has the same cells, and its face is Cells_Bold, from the font outlines. In the draw record of the interface package, the field weight of a text record is the weight of a text (0 regular, 1 bold). Bold with Spleen, or with no bold face, is the regular weight; the width of a text does not change.

7. The setting

The principal chooses the font, the order of the stripes, the pointer theme, the grid fit, the layout of the keyboard, the appearance, the scale factor, the time zone and the language list in the process settings. The choice is one shared page whose values only settings writes; every window reads it and draws again when it changes, and the choice survives a stop of the machine.

The settings are the smallest form that keeps the properties:

  • Where it lives: one page, the settings page (src/library/modus/contract/settings). The root service creates it at start. The page holds the choices only (the change count and one value for each setting): it holds no address, no size and no hash of a font file, because the process settings writes it (section 5, "Who can write a cache"). The process settings receives it with Write (the role Settings of the root service: the one writer). Each process with a surface, each terminal and the compositor receive it read-only at the fixed range Settings_Page (settings.PAGE_ADDRESS), with its bit in the value 20 of their context, as the font outlines (P20: a grant of the root service, read-only; P9: no shared file). The root service writes the defaults into the page that it creates: the vector font, rgb, the scale 1.25. An all-zero page is refused, as the word 0 names no scale.
  • A change while processes run: settings writes the page (the change count is odd during the write) and wakes the threads that wait on the change count. The compositor waits on it: it gives the new choice to its own text, draws its whole screen again, and sends the display event Settings_Changed to each window. src/library/modus/display gives the new font to src/library/modus/graphics when the process reads the event, between two frames; src/library/modus/interface draws the whole window at the next frame (each draw record is the same, each pixel of text is not). A process draws again as it does for any event. The event is not enough alone: the compositor tells only the windows that have a surface, and a window that read the page before the boot pass of settings and made its surface after it gets no event. So interface.window_frame_begin reads the choice at each frame (display.text_settings_apply, which says when the font, the order, a face or the appearance changed), as the drawing module does at each draw, and the terminal at each turn of its loop: the measure of an interface text decides its font from it, and a stale font would measure it in B612 over the setting spleen. The terminal writes terminal: console draws its interface text in the font of the cells (or in the interface font) at each change, which the machine test waits for.
  • The settings (one value of the page and one enum of src/library/modus/contract/settings each; the window shows the names of settings.descriptions, and the export takes the enums, whose members its module file names): font (.vector, .spleen), subpixel_order (.red_green_blue, .blue_green_red, .none), pointer_theme (.of_the_owner, .of_the_system), grid_fit (.on, .off), keyboard_layout (.united_states, .french) and appearance (.auto, .dark, .light). Value 0 of each is its default. The window names them rgb, bgr, owner, system, us. The module gives display texts for the members whose name is not the word that a principal reads, which the palette and the completion show: RGB, BGR, owner, system, US, and 1.25 to 2 for the scale (Module contract: The display text of a member). A line types the name.
    • The pointer theme: the root service gives the compositor both pointer theme files of the boot image (pointer_theme_choice in src/modules/system/root/resources.odin is the one place of their order: the values 6 and 7, then 18 and 19); the compositor validates each once and the setting chooses one live (pointer_theme_choose, a log line "the pointer theme in use").
    • The grid fit: the setting chooses the face of the cells, Cells with the fit or Cells_Without_Grid_Fit without it (display.cell_faces); each draws from the same font file, and the grid fit is in the key of the private glyph cache, so a change draws the glyphs of the other face once and keeps both. The picture font_without_grid_fit.
    • The layout of the keyboard: the root service maps the settings page, read-only, in the input service, which reads the value at each key: a change holds from the next key. The two layouts are the United States (QWERTY) and France (AZERTY). A key record carries its character as a code point: the layout of France gives é, è, ç, à and ù from their keys, and â, ê, î, ô, û, ë, ï, ü and ÿ from its two dead keys, ^ and ¨ (Glossary: Dead key; the rules are in The layout of the keyboard in the repository). AltGr, the right Alt key, gives its third level: #, {, [, |, \, ^, @, ], }, ¤ and € from the keys of the row of the digits, of $ and of e, and the dead keys of the tilde and of the grave accent, which give ã, ñ, õ, à, è, ì, ò, ù and their capitals (Glossary: AltGr). AltGr with e gives the euro sign €, which each font draws. The tables are in src/library/internal/input/keyboard_layout. The input service holds no other right for it: the page is the one thing that it reads.
    • The appearance: appearance (auto, dark, light) chooses the colors of the whole desktop (The design rules: The appearances; the design is The appearance in the repository). The page holds, beside the values, the appearance in force: dark or light. With auto, the light appearance holds from 07:00 to 19:00 of the local time and the dark one at night, by the date page and its time zone; a system with no date is dark. The process settings is the sole writer of the settings page: it writes the appearance in force with each change of the values, on date-page updates, and at 07:00 and 19:00 of the local time, with no wake between them. A process reads it at each frame, and the compositor sends Settings_Changed to each window when it changes. The log says why: "settings: the appearance in force is light: the setting light".
    • The scale factor: scale (.eight_eighths, 1, to .sixteen_eighths, 2; .ten_eighths, 1.25, is the default) is the count of pixels of the screen for one logical pixel, in eighths: the word of the page is the count itself, so its first word is 8 and not 0 (settings.word_of_value). Each window lets its surface go, makes its surface at the scale that the compositor names from its own budget, and draws again; the log has the line "display: <window>: the surface of 715x880 at 11 eighths" when the compositor takes it. Between the two surfaces the compositor draws the frame of the window with the background. Each member is a scale that the principal sets; a window whose budget cannot pay the scale declines it and shows its frame only, and the window of settings says how many did. A kept record of the six settings before the scale reads with the scale 1.25. The design is From the desktop of today to a light web browser: The reference screen in the repository.
    • The time zone: time_zone is not a row of settings.descriptions, because its value is a number and not a name of a list: a fixed offset from UTC, from -12:00 to +14:00 by quarters of an hour, with no summer time; +00:00, UTC, is the default (settings.set_time_zone("+08:00"), and settings.time_zone() gives it). The page holds it beside the values (zone_offset_minutes). The process date copies it into the date page and wakes settings, which then moves the appearance in force of auto when the local time asks for it; the bar shows the local time. The design is The time zone in the repository. The log: "settings: time zone +08:00; kept in the store", then "date: the time zone of the date page is +08:00, from the setting time_zone".
    • The language list: languages is not a row of settings.descriptions either: it is the languages that the principal reads, the first first, as at most 8 records of language_tag.Locale (Glossary: Language list). The page holds them beside the values (language_count, languages); an empty list, the zeros of a new page, is English. settings.language_list_valid is its border: a count past 8, a damaged record, the root locale und, a language twice or a record past the count refuses the whole page, as a word that names no value does. The design is The interface in the language of the principal: The identity of a language in the repository. The log: "settings: languages fr-CA, en; kept in the store".
    • The scheduling strategy is not a setting. The right Schedule belongs to scheduler. The settings service must not get a kernel right to pass it on (property 20: a service does not combine its own access with the request of a caller), and asking scheduler needs scheduler to run as a service at boot with that right. The principal changes the strategy through scheduler, the process that holds the right: in its window, or with its export strategy_set, which the console runs as strategy(name) and the palette as an entry, and which serves only a caller that acts for the principal (Scheduling strategies: The change at run time). The process does not run at boot: it must be started. A strategy that survives a stop needs the root service, which holds the machine with each right, to read a record at boot. This is not built: it needs its own grant decision.
  • The process settings: a resizable window of the interface package, from 400 × 320 to 1024 × 800 logical pixels, whose sections reflow in one column, or two from a width of 720, with a scroll bar when they do not fit (the design is The window of settings in the repository). Four cards: Display (the scale, the appearance, the font, the color stripes, the grid fit), Pointer, Keyboard, and Region and language. Each setting has its name, one line that says what it does, and its values as buttons with words for a reader (Spleen 8x16, None (gray), French (AZERTY)); the value in force is the marked button (the pointer and the keyboard: Tab, then Enter). The scale is a track of one stop for each member, 100 % to 200 %, each selectable; a line under it counts the windows whose budget declined the scale in force. The time zone is a list of the 38 offsets that the earth uses, each with places that keep it as their standard time (UTC+05:30 India, Sri Lanka), the zone in force chosen. The languages are the list in its order, each line with its name, Up and Remove, then Add and the common languages that the list does not hold: English, French, French (Canada), German, Spanish, Japanese and Arabic. The window is the preview of the font, the appearance and the scale: it draws again at once in the new choice. Exports with descriptions (P19):
    • settings.set(font, subpixel_order, pointer_theme, grid_fit, keyboard_layout, appearance, scale): one optional argument for each setting, of the enum of its setting, so a line gives the settings that it changes by their names: settings.set(keyboard_layout = .french), settings.set(font = .spleen, grid_fit = .off) (Module contract: Enum parameters). The console completes the members and refuses one that the enum does not have before the call. The result is 1, or an error record: No_Grant -1 for a caller that does not act for the principal, Absent -2 for a call that gives no setting, Bad_Value -3 for a value that names no member, Refused -4 when the store did not keep the values.
    • A getter for each setting, which the parameter of the same name of set names in the module file: settings.font() gives .vector or .spleen, and so do subpixel_order(), pointer_theme(), grid_fit(), keyboard_layout(), appearance() and scale(). The palette calls them when it opens, to mark the member in use of each row.
    • settings.set_time_zone(zone) and settings.time_zone(): the zone as a text, +08:00.
    • settings.set_languages(languages): a table of 0 to 8 language_tag.Locale records, the first first; language("fr-CA") of the console reads a tag into its record. The result is 1, or an error record, and no language changes: Too_Long -3 for more than 8 records, Out_Of_Range -3 for a count past the capacity of the table, Bad_Value -3 for a record that is not a canonical locale or is the root locale (value: the Locale_Problem; found: the record, from 1), Exists -3 for a language twice, Refused -4 when the store did not keep the list. settings.languages() gives one row for each language: its canonical tag, its language, its script and its region.
    • settings.repeat(count): count records kept, one commit each: the case of the loss of power. The console calls them after connect("settings"), and the palette shows one row of buttons for each setting from then; modustool call calls them through remote.
  • The settings survive a stop. settings keeps the values as one record of 440 bytes (Kept_Settings: a magic, the version 3, a count, 8 values, the time zone, the count of the language list and its 8 records) in one object of its private store (P9): a change writes the record (one commit) first, then the page. At boot the root service starts settings for a boot pass (the context value 17): it reads the record, writes the page, wakes the compositor and stops, with no window. The log has one line of it, settings: the boot pass: ...; in N us. The storage service and the block service of the data disk start at boot for it. A record of another version, or none, gives the defaults. The boot pass writes the defaults in place of a record of another version, so a disk of an older system loses its settings once, and the next boot reads a valid record.
  • The boot display reads no setting: its text is Spleen in each drawer (The boot display at the scale of the screen in the repository). The first frames of the windows use the defaults (the vector font, rgb) until the boot pass, as the root service reads no store; then the compositor sees the change of the page and each window draws again with the kept settings (its first loop compares with a change count of 0, so a window that read the page before the boot pass is told too). The boot pass takes 23 ms in the machine test with a new disk.
  • A loss of power (modustool test power, the case power_loss_settings_run): settings.repeat(1000) writes 1000 records, and the disk loses its power at the write of a root. Each of 306 images that a loss can leave (72 with a torn write) gives the durable record or the record in flight, never a mix, and each record is valid; the second machine starts on the hard image and its boot pass writes the durable record on the page.

8. Fallback

  • No font outlines, or outlines that their validation refuses: the process draws Spleen 8x16, and its log has one line ("display: no font outlines: the text is Spleen 8x16" or "display: the font outlines are refused: <sentence>, value <n>: the text is Spleen 8x16"). Outlines that lack the first font of a face: that face draws nothing, its text is Spleen or the font of the cells, and the log names the count of the fonts that the chains lack.
  • Outlines whose hash is wrong: the root service does not map them (one line on the log), and no process has them.
  • A damaged font file at build time: the tool stops the build with the problem (vector_font.Font_Problem). The reader checks each read (host test hostile_files: the file cut at each 211 bytes, 48 files with 64 changed bytes, each glyph drawn at the three scales: no fault).
  • The boot display uses no font file: the boot program has none before it checked the boot image, so the boot program, the root service and the process boot draw it in Spleen at the size of its scale, the same pixels in each (The boot display at the scale of the screen in the repository).
  • A character that the font lacks: each font of the system holds ASCII 32 to 126, the Latin-1 Supplement and the euro sign, and each candidate has all of them (the subset command refuses a font without one). Spleen 2.1.0 has them too (modustool font). A text is UTF-8: the drawing decodes it, gives each character one cell, and draws each other character, and each invalid sequence, as the replacement glyph, the outline of a box (graphics.character_replacement), in both fonts and at each scale. A process with the font outlines draws the Greek letters of B612 in a text of the interface font, and the box-drawing characters, the block elements and the five Greek letters of Paper Mono in a cell of the vector font, each into its private glyph cache (section 13).

9. Measures

Each pair was measured in the same hour with the same tool: Spleen at the commit c909390, the vector font rebased on cacaf48 (the frame caches are between: they do not draw). The load of the host was 15 to 37 during each run (uptime in the log of the run): above 8, so by the rule of the project these numbers are not valid measures of speed. They show the order; a run on a quiet host is needed.

MeasureSpleen (c909390)The vector font
flood: lines in one second (the terminal draws a full window at each picture)3 925 3164 302 808 (other runs: 1 594 054 and 2 629 205 at load 30 to 45)
The terminal: pictures in one second6262
A full frame of the desktop with 16 windows, measured on a screen of 1024 x 768 (the reference screen is 1920 x 1080)1 683 to 3 424 us1 523 to 2 653 us
interface_elements: the whole frame / the next frame in its damage402 / 119 us637 / 158 us (875 / 209 us at load 45)
time_page: one picture, the mean of 1019.9 us31.5 to 46.3 us (211.7 us in one run)
The boot image3 566 097 bytes (cacaf48)3 778 016 bytes: +390 624 the glyph cache, +64 193 settings, -231 953 vector_glyphs (the 343 KB file of DejaVu out, six subsets in)
The glyph cache390 624 bytes; its hash checked by the root service in 796 to 966 us

The console stays fast: the producer writes into the terminal ring, and the terminal draws at most 62 pictures in one second whatever the font; a picture of the window of flood (about 2 500 characters that are not spaces) costs about 0.7 ms more with the vector font (2 500 times 274 ns), under 5 % of a processor at 62 pictures in one second. The full frame of the compositor copies surfaces: the font does not enter it.

10. Gaps

  • One glyph from the cache costs 3.2 times a glyph of Spleen at scale 1 over a flat color, and 5.3 to 5.6 times over a gradient across or a picture, where the blend tables do not apply (section 5).
  • No grid fit of each stem; no stem darkening (gui_toolkit thickens the stripes by 0.2 pixel; not tried here).
  • The first frames use the default settings until the boot pass of settings (section 7).
  • The scheduling strategy is not a setting and does not survive a stop (section 7).
  • The glyph caches hold no character past the Latin-1 Supplement but the euro sign. Past them, each window draws the Greek letters of B612, the box-drawing characters, the block elements and the five Greek letters of Paper Mono, and Π, ρ, the Cyrillic letters and Latin Extended-A of Noto Sans, in its labels, its titles and its cells (section 13). A character joins the list of the added characters when each font draws it (Text encoding: UTF-8 in every contract in the repository). A monospace cache has no subpixel position; the proportional font and its pairs are in section 12.
  • The order of the stripes of the screen is not detected: under QEMU it is the panel of the host, which the system cannot read.
  • The measures of section 9 were taken on a host with a load above 8.

11. Open decisions

  1. 1. The font file: Paper Mono (section 6). Another candidate is one line, DEFAULT_VECTOR_FONT.
  2. 2. The grid fit by default: on (now) or off. It is now a setting of the principal (both caches are in the boot image); the decision is only which value is 0.
  3. 3. The order of the stripes by default: rgb (now), or none until the system can know the panel.
  4. 4. The interface font: the size of B612 (an em of 13.33 pixels: capitals of 10 rows), and the positions of its cache (3 at scale 1 and 1 at the scales 2 and 3: 509 340 bytes measured with the Bold titles; or 3 everywhere: about 2.45 MB, estimated), section 12.
  5. 5. The scheduling strategy across a stop: a record that the root service reads at boot, or none (section 7).

12. The interface font and the text shaping module

Words that name things (titles, labels, buttons, menus) read better in a proportional font, where each letter has its own width. The system has one, B612, beside the font of the cells. A proportional font needs shaping: the place of each glyph comes from its advance and from the pair that it forms with the next one.

B612 (<https://github.com/polarsys/b612>, version 1.008, the package b612 of nixpkgs; SIL OFL 1.1 with no Reserved Font Name: "Copyright 2012 The B612 Project Authors [...] This Font Software is licensed under the SIL Open Font License, Version 1.1", read in OFL.txt of its repository) is the font of the interface: the titles, the bar, the menus, the labels, the cards. It is proportional. Paper Mono stays the font of the text that is monospace (section 6). The system needs a module of text shaping and pair spacing for it. This section is the design; 12.8 says which parts are written.

12.1 What B612 has, read in its files

B612 RegularB612 Bold
Outlinesglyf (TrueType), 593 glyphs; no glyph of ASCII is made of glyphsthe same
Units for one em20002000
Advances of ASCII 32 to 12619 different values from 400 to 2000 units, the mean 1148; the space 700; i and I 600; m, M 1800; W 1900the same advances
Digitseach 1300: digits are tabular, a column of numbers alignsthe same
Ascender, descender (hhea, typo of OS/2)1930, -500; the ink of ASCII from -517 to 17201930, -500
x-height, cap height (OS/2 sxHeight, sCapHeight)1100, 1500. The flat tops of E, T, Z are at 1500; the stems of H, I, L end with an angle at 1520, and x reaches 11171100, 1500; the top of H is 1527
Ink beyond the advance boxat most 61 units left of the origin (j), none past the advance126 left (j), 52 past the advance (K)
Pair adjustmentkern version 0, one subtable of format 0: 1017 pairs; GPOS with one lookup of type 2 (pair adjustment, subtables of format 1 and 2), feature kernkern: 1061 pairs; GPOS the same form
SubstitutionGSUB with no feature: no ligature, no contextual formthe same
Box drawingnonenone
  • For ASCII, kern and GPOS give the same pairs: 232 pairs in Regular and 239 in Bold whose two glyphs are ASCII, each with the same value in both tables, none in one table only (read on the files with a script outside the system, not with code of the system). The values are -200, -150, -100 and +100 units in Regular, and also -50 and +50 in Bold: at the size below, -1.33 to +0.67 pixel. Examples: "To", "LT", "Ty" -100; "LV" -150; "Wa" -100 in Bold only. "AV" has no pair in either weight: B612 spaces "A" and "V" by their advances alone.
  • So the first version reads hmtx and kern format 0 only. It reads no GPOS and no GSUB, and has no ligature and no other script. A font whose pairs are only in GPOS needs the GPOS reader later, behind the same contract.

12.2 The size on the grid

  • The line stays 16 pixels at scale 1 (32, 48 at the scales 2 and 3), so a label sits in a line of the grid as text does now.
  • The em of B612 at scale 1 is 13.33 pixels (2000 units to 13.33 pixels, one unit is 1/150 of a pixel): its cap height is then 10 pixels and its x-height 7.33 (the grid fit of section 2 gives 7). The cap height and the x-height are the values that the font states in OS/2 (1500 and 1100), not the tops of the outlines of H and x (1520 and 1117 in Regular, 1527 and 1124 in Bold), which the monospace path uses (section 2): the flat tops of the capitals must sit on whole rows, and both weights get one scale. A host test checks that E, T and Z have ink on rows 2 to 11 exactly. Its ink, from -517 to 1720 units, is 14.9 pixels: inside 16 rows, with the baseline on row 12.
  • Its mean advance in ASCII is 7.65 pixels: a label in B612 is about as wide as in Paper Mono (8 pixels), narrower for lowercase text, wider for capitals (M 12 pixels).

12.3 The text shaping module

A module (property 10: shared code with exports), with batch exports whose parameters are tables (Module contract: Tables and bytes as parameters). Its name: text_rendering. Each process compiles the shaping of the package src/library/modus/text_rendering in (section 14); the library module src/modules/libraries/text_rendering gives the same work to a caller that does not compile the package, as interface_module does for src/library/modus/interface.

As written:

ExportParametersResult
shape_textthe font outlines (Bytes, Read), the face, the text size, the text (Bytes, Read), the placed glyphs (Append), the error recordthe count of placed glyphs of the full answer, or -1
measure_textsthe font outlines, the face, the text size, one table of bytes (Read), the ranges (Change: start, count, and width that the export writes), the error recordthe count of ranges, or -1
break_textthe font outlines, the face, the text size, the text (Bytes, Read), the room in 1/64 of a pixel, the lines (Append, one Text_Range for each line), the error recordthe count of lines of the full answer, or -1
  • The font outlines are bytes of the caller: the resource font_outlines that its starter mapped, or a copy of it, on 8 bytes. Each call opens the fonts of those bytes on its stack (about 16 KiB), measures with them, and keeps nothing. So an isolated call receives the outlines in the call region like the text, and gives the answer of a direct call.
  • The face is a number of text_rendering.Face from 1 to 5. The export refuses each other number, and None, with Bad_Value. The text size is the height of a line in 1/64 of a pixel: a size under 256 is refused with Too_Small, a size past 16 384 with Bad_Value. Outlines that font_outlines.validate refuses give Bad_Value with the problem as the value; outlines with no first font of the face give Absent with the font as the value.
  • Hostile bytes: the caller can change its bytes during the call. The header and the records of the outlines are copied once and checked; the parser checks each read of a font file against its bytes; font_open refuses a character map whose segments pass its subtable or whose end codes do not grow strictly, so glyph_of finds a segment by halves, not in a line of up to 32 767 segments; each advance and each pair is kept in its bound at its read (an advance from 0 to one line, a pair within half a line, at any size). A changed byte gives other numbers, never a read out of the bytes, and the x of each glyph holds in an i32.
  • A character that no font of the chain has (and a control character, and an invalid sequence of UTF-8) is placed as REPLACEMENT_GLYPH, with the advance of 0 and no pair, and the reader draws the replacement glyph there, so a reader sees that the font does not draw it. Each placed glyph has the first byte of its character as its cluster.
  • The widths in a table of ranges: the width is a field of each range record, which the export writes (the direction Change), as sum in the records of sample.sum_words.

The design before the code:

  • Input: the font (a record: its kind, its scale, its weight) and a table of characters: the bytes of a text of UTF-8, with glyphs for ASCII 32 to 126, the Latin-1 Supplement and the euro sign.
  • Output: a table of placed glyphs, one for each character, in memory of the caller. A placed glyph is 16 bytes: the glyph (its index in the glyph cache), x (its origin from the origin of the run, in 1/64 of a pixel), the advance in 1/64 of a pixel (with the pair adjustment that follows it), and 4 bytes that are zero (a cluster number for a full shaper later).
  • The measure of a text is the sum of its advances: one export text_width that gives it with no output table, for the layout.
  • Many texts in one call: a second form takes a table of runs (each a start and a count in one table of bytes) and fills one table of placed glyphs and one table of widths: a window measures all its labels in one call.
  • What it reads: this first design read the advances and the pairs of the glyph cache, which the tool wrote at each scale. The shaper now reads the font file at each measure (section 14.7): the advance of the table hmtx and the pair of the table kern (878 pairs in B612 Regular and 914 in Bold), at any size.
  • The work for one character: one lookup of its glyph in the character map of each font of its chain until one has it, one advance, and one search of the pair with the next glyph in the sorted pairs of its font (10 compares).
  • The same contract takes a full shaper later: characters in, placed glyphs out. A shaper with ligatures gives fewer glyphs than characters and uses the cluster number; the callers already read the count of the output.

12.4 The glyph cache with subpixel positions

  • Positions: a glyph of a proportional font does not start on a whole pixel. With the subpixel bands, the finest step that the screen shows is one third of a pixel: the cache keeps each glyph at 3 positions, 0, 1/3 and 2/3 of a pixel. The draw rounds the x of a placed glyph (in 1/64) to the nearest third, so the error is at most 1/6 of a pixel; the shaper keeps the exact sum, so errors do not add up along a run.
  • The cell of a glyph is its ink box, not the cell of the grid: its width is the ink width plus the spread of the filter (two thirds of a pixel on each side) plus the position, its left side at a stated bearing from the origin. The glyph entry gains this width and this bearing (left, width). It was one format of the glyph cache file, for the monospace caches too (section 5): fewer paths than two formats. The file left the system; the private glyph cache keeps the same box of each glyph (text_rendering.Glyph_Entry).
  • The renderer (vector_font.glyph_render_placed): the glyph is drawn in a work row of 64 pixels with its origin at column 4 plus the position (one third of a pixel for each step), then cut to the box of its ink. A glyph whose ink reaches a side of the work row is refused. The size on the grid: the cap height is 10 rows at scale 1 (PROPORTIONAL_CAP_HEIGHT_ROWS), so 1 200 units of B612 are the 8 pixels of a cell (the stated cap height of 1 500 units times 8 / 10). The advances and the pairs are scaled the same way and rounded to 1/64 of a pixel, each on its own, to the nearest integer, a half toward plus infinity, the same rule for a negative value: "A" 1 300 units is 554.67, so 555/64 of a pixel at scale 1; "To" -100 units is -42.67, so -43/64; "LV" -150 units is -64/64 exactly.
  • The rule of the sum: the cache keeps the rounded advance and the rounded adjustment, and the shaper adds these integers. So the advance of a glyph followed by a pair is round(advance) + round(adjustment), not round(advance + adjustment): "T" before "o" is 512 - 43 = 469. The two rules can differ by 1/64 of a pixel for one pair; the x of each glyph is the exact sum of the integers before it, so no error adds up along a text beyond the rounding of each term (at most 1/128 of a pixel each).
  • Size, measured (modustool vector_fonts, 2026-11-11): B612 Regular with 3 positions at scale 1 and 1 at the scales 2 and 3, 408 524 bytes; B612 Bold at scale 1 with 3 positions, 100 816 bytes; together 509 340 bytes. These two were measured with the cap height taken from H (1 520 units), before the correction above: with 1 500 the glyphs are 1.3 % larger on each axis, so a new run gives a few percent more. The table below is the estimate from the boxes of the glyphs, made before the build; it was 10 % (Regular) and 18 % (Bold) above the measures:
Cache1 position3 positions at each scale3 positions at scale 1, 1 at the scales 2 and 3
B612 Regular, scales 1 to 3376 KB1 165 KB452 KB
B612 Bold, scales 1 to 3415 KB1 288 KB497 KB
B612 Bold, scale 1 only (the titles)39 KB123 KB123 KB
Today: the cache of the monospace font390 624 bytes
  • Built: B612 Regular with 3 positions at scale 1 and 1 position at the scales 2 and 3, and B612 Bold at scale 1 with 3 positions: 509 340 bytes measured (575 KB estimated) more in the boot image. At the scales 2 and 3 a glyph on a whole pixel is at most half a pixel from its place in a glyph of 26 to 40 pixels. With 3 positions everywhere, 2.45 MB.

12.5 What changes in src/library/modus/interface

  • A font kind: Font_Kind gains Interface (B612), beside Cells_8x16 (the monospace font). The weight is the field weight of a text record.
  • The text record: the kind Text with the font Interface. Its box is the measured box widened by the ink margin of the font on each side: 2 pixels for B612 (its ink passes the box by at most 126 units, 0.84 pixel, and the filter by two thirds of a pixel). Its origin is a place in 1/64 pixel on a third of a pixel, the margin right of the left edge of its box, because the cache has 3 positions only (The interface of the processes: Draw record). So the damage stays exact.
  • The draw: execute asks the module for the placed glyphs of the run, then draws each glyph from the cache at its third of a pixel. The glyphs of one run can overlap by their margins: the blend reads the pixel under, so an overlap is drawn right.
  • The spacing tokens place the elements, not the letters: the space between a card, a button and a line of a table is a token or a sum of tokens (The design rules: Spacing); the text inside starts at the inner place of the element, and its width is what it is. A size of a column that came from a count of characters (characters(n)) stays n times 8 for the monospace font; measured_size(text) gives the width of a text in the interface font, with no round up.
  • Elements that change: the title and the caption of a card, a label of label_value_line, a button, a line of a list, the bar and the menus of the compositor, the title bar of a window. The values of label_value_line that are numbers stay monospace (the rule below).

12.6 Which text stays monospace

A rule that a process can follow:

  • Monospace (Paper Mono): each text that is a grid of cells (the terminal, the console, Text_Grid records); each text that a reader compares character by character or copies (hashes, addresses, names of exports, code, the text of a log record); the columns of a table whose values align by character.
  • Interface (B612): each text that names or explains: titles, captions, labels, buttons, menus, the bar, the title of a window, sentences of help.
  • Numbers: in either. The digits of B612 are tabular (1300 units each), so a column of numbers aligns in B612 too, at the right of its column (The design rules: Text).

12.7 The cost for each glyph, against today (estimated, not measured)

  • Shaping: one advance and one pair for each character: a few nanoseconds, against 0 today (the advance of a monospace font is a constant).
  • Drawing: the box of a glyph at scale 1 holds about 100 words with 3 positions, against about 64 words in the rows with ink of a cell today; the partial pixels are about the same (the ink is the same). Expected about 1.2 times the fast blend of today (109 ns on the host at scale 1 over a flat color).
  • The measure of a label: one call of the module for all the labels of a frame; today text_width is a multiplication.

12.8 The parts, each one working

Each part below is written. Part 2 also writes the two caches of B612 in build/fonts at each modustool vector_fonts. Parts 4 and 5 come with the process interface_font.

  1. 1. The shaping data in the tool: modustool vector_fonts subsets B612 Regular and Bold (ASCII, simple glyphs, kern format 0 kept as a sorted pair table) to resources/fonts; host tests: the advances and the pairs of the subset against the font file, and the pairs of kern against those of GPOS (the check of 12.1, as code).
  2. 2. The glyph cache version 2: a glyph entry with its box width, its bearing and its positions; the advances and the pair table of each scale; its validation; the builder in src/library/modus/vector_font; host tests: the bit-for-bit test of each position against a render at that offset, the golden hashes, damaged fields.
  3. 3. The shaping module, now the library module text_rendering, with its exports over the font outlines of the caller (12.3); host tests: the three ways to call give the same records; each argument of a hostile caller is refused with its argument named; the bounds hold at the largest size.
  4. 4. graphics.text_proportional: draw a table of placed glyphs with the fast blend at thirds of a pixel; host tests bit for bit against the reference blend; the measure of section 5 for B612. Written:
    • graphics.text_proportional(canvas, place, y, placed, face, scale, color): place is the x of the origin of the text in 1/64 of a pixel. Each glyph goes to the nearest third of a pixel (text_rendering.position_of), from the private glyph cache of the process (text_rendering.glyph), through the blend of the text of cells (glyph_words_draw: the table blend, with the form of the target as its fallback), cut to the canvas. The glyph REPLACEMENT_GLYPH, and a glyph that no font of the chain draws, draw the replacement glyph at their place. A glyph past the character indices that is no fallback glyph, a glyph far outside the canvas, a scale out of 1 to 3 and a face that is not proportional draw nothing.
    • The ink margin: the ink of a text passes the box that its measure gives by at most PROPORTIONAL_INK_MARGIN (2 pixels at scale 1) on each side. The host test the_ink_lies_inside_the_measured_box draws 200 texts at places with a fraction of a pixel and counts the pixels of ink outside the box and its margin.
    • The host test proportional_text_gives_the_same_bytes_in_each_blend compares the table blend, the SSE2 form and the scalar form for three texts, three places, each order of the stripes and four backgrounds.
    • The text of cells refuses a proportional face (graphics.text_faces_use): its glyphs pass their cells, so the damage of a grid of text cells would leave stale pixels.
    • The process interface_font (picture interface_font): a paragraph in B612 Regular, a line in B612 Bold, "To", "LT", "Ty" at scale 3 with and without the pair adjustment, one word at 0, 1/3 and 2/3 of a pixel enlarged 4 times, numbers at the right of two columns, and the time of one line (shaping and drawing, the least of 50 batches, and the first draw, which draws each glyph from its outline, on its log and in its window). It takes its two faces from the font outlines (part 5).
  5. 5. The faces of the interface font: Interface and Interface_Bold from the font outlines, which the root service maps read-only for each process with a surface, each terminal and the compositor; a fallback to the font of the cells when the outlines lack B612. Written. display.interface_font_open gives the two faces when this process opened them (display.interface_faces_opened). When they are absent, the process interface_font says so and stops. The fallback to the font of the cells is in src/library/modus/interface (part 6). The two glyph caches of B612 that the boot image held before left it.
  6. 6. src/library/modus/interface: the font kind Interface, the text record with its origin fraction and its margin, measured(text); the card, the label, the button, the list in B612; the damage tests with overlapping glyphs. Written:
    • The font kind Interface beside Cells_8x16, and the text record in that font (a Text whose font field is Interface): its box is the measured box grown by the ink margin, its origin in 1/64 pixel on a third of a pixel. The execution shapes the text and draws it with graphics.text_proportional.
    • The font is the font of the table: Draw_Table.interface_font, which window_frame_begin takes from display (found once at open). A text is measured in the font that draws it (font_in_use): with no interface font, or with the setting Spleen 8x16, each element draws in the font of the cells with the same rules.
    • text_measured_width, texts_measure (the lines of a list, in one call), measured_size (a column as wide as its text) and text_fit (the longest start that fits): each element cuts each text to its box, in either font.
    • The elements: names, titles, labels, buttons, lists, headers in the interface font; values in the font of the cells (The interface of the processes: Text).
    • Host tests: damage_of_interface_text_equals_the_whole_frame (200 pairs of frames, byte for byte against a whole frame), no_element_passes_its_box_in_either_font, the_font_of_a_text_is_the_font_of_its_measure, hostile_interface_text_records_draw_nothing; in the drawing module (src/modules/libraries/drawing), hostile_interface_text_records.
    • The module interface_module finds the interface font of the process that runs it: in a direct call the caller's (the font outlines, which its copy of the text rendering opens to measure), in an isolated call none (the call host has no font outlines), so its elements draw in the font of the cells there.
    • The drawing module (The interface of the processes: Where it lives: the elements in each process, the drawing in a module) draws the text of each process that imports it. It loads the text settings and the interface font of the process at its first draw, from the context of the process, into its own data: the same font outlines at the same fixed range, opened a second time by the copy of the code in the module, which draws each glyph into its own private glyph cache. It reads the choice of the settings page again at each draw. The process measures a text from the font files that its own copy of the text rendering opened (section 14.7).
    • The measure: interface_elements logs the time of one whole frame, built and drawn, in each font (the least of 20). Not measured yet.
  7. 7. The compositor: the bar, the menus, the title bars, the palette in B612. Written:
    • The compositor loads the interface font as each process does (display.interface_font_load): the root service gives it the font outlines and their bit with the settings page, before it starts. No change of the start order.
    • Names in B612: the lines of the two menus and their headings, the names of the window plates and the labels of the tray, the titles of the windows (cut in their font before the close button), the names, the hints, the headings and the sentences of the palette. Values in the font of the cells: the clock and the date, the text that is typed, the counts of the menus and of the palette. The cross of the close button stays a cell.
    • The bar layout (bar.Layout): the widths of start, windows and the widest name, measured in the font that draws the bar. Each place of src/library/internal/compositor/bar takes it: a button is its label and a padding; a column of the start menu is the widest name and a padding, with no round up; the menu of the windows keeps a room of 256 pixels for a title, the room of its 32 cells, so it has one width in both fonts. bar.button_at, bar.line_at and bar.windows_line_at map a point to an entry; host tests check each entry in four layouts, B612 among them.
    • The compositor writes compositor: the bar is in the interface font: start N pixels, windows N, the widest name N (or ... in the font of the cells) at its start and at each change. The modus tool reads the last such line, measures the layout from the font outlines of the build (build/fonts/font_outlines.bin), and refuses a step when its numbers differ from the line.
    • Damage: a title is written once, when its surface is created, and is in the damage of its window. A change of the bar layout damages the bar and the places of the old and of the new menus.
    • The measure: compositor: the bar and the start menu, built and drawn (the least of 20), in each font, once after the first frame of a measure run (system.measure_run): never on the path to the first frame.
    • The boot display: not in B612. The boot program holds no font file, so the display is in Spleen in each drawer, the root service too, at the size of its scale (The boot display at the scale of the screen in the repository). The design rules: Text, writes the rule.
  8. 8. The design rules: Text: the rule of the two fonts of 12.6 is a design rule. Written.

12.9 Where this design is least sure

  • The interface font is a choice of each table: a process that builds its own tables (the compositor, the measures) keeps the font of the cells unless it names the font. A record of the interface font drawn by a process with no interface font is drawn in the font of the cells, cut to its rectangle: a module in an isolated call never meets this, because it measures in the font that it has.
  • The ink margin of 2 pixels at scale 1 is the bound that the test of 200 texts of graphics measured for B612; another interface font needs its own margin.
  • The sizes of 12.4 of the two caches that are built are measured; the other columns of its table are estimates from the glyph boxes, which were 10 % to 18 % above the measures.
  • The cost of 12.7 is an estimate; the fast blend tables need two pixel colors at the two ends of a row of a glyph, which holds for a label on a card, not for a title bar with a gradient across (the reference blend there, as today).
  • kern and GPOS agree for ASCII in B612 1.008; a later version of the font, or another interface font, can have pairs in GPOS only.
  • 3 positions and not 4: the step of the stripes is a third; a finer step is invisible with the subpixel bands and costs one more copy of each glyph.

13. Glyphs past the glyph cache

Each font of the system holds 192 characters, and some hold more. A character takes the glyph of the first font of its fallback chain that has it. Each process draws each glyph itself, the 192 characters and those past them, from the font outlines of the boot image, into its private glyph cache. No process asks another for a glyph, and no shared memory holds a glyph that a process drew. The boot image carries the outline of a character, not its drawn words at each size. The intent of this design is Glyphs past the glyph cache in the repository; the glyph caches of the boot image left with Text rendering: one module for text at any size in the repository.

13.1 The parts

PartWhereWhat it does
The font outlinesthe resource font_outlines, src/library/modus/contract/font_outlines, the fixed range Font_OutlinesThe font files of the faces (B612 Regular and Bold, Paper Mono, Paper Mono SemiBold), each with its name and its BLAKE3 hash. The root service maps it read-only beside the settings page; a process validates its header once.
The text renderingsrc/library/modus/text_renderingIn each process and in the drawing module: the fonts of the outlines opened once, the faces, the chains by script, the advance of a character from its font file at a text size, the shaping, the breaks of the lines, the rasterizer at any size, and the glyph of a character from the private glyph cache (section 14).
The facestext_rendering.FaceInterface (B612 Regular), Interface_Bold (B612 Bold), Cells and Cells_Without_Grid_Fit (Paper Mono with and without the grid fit), Cells_Bold (Paper Mono SemiBold). A face draws once the outlines hold its first font (face_opened); display gives graphics the face of the cells of the setting grid_fit and Cells_Bold.
The private glyph cachetext_rendering.Private_Cache262 144 words (1 MiB) in runs of 32 to 16 384 words, and 4 096 entries by face, font, glyph index, text size and position, in the memory of the process. A new glyph that finds no room evicts the glyphs used the longest time ago, counted in frames (text_rendering.frame_begin), never a glyph of the frame in progress.
The root servicesrc/modules/system/root/text_settings.odinChecks the font outlines, and maps them with the settings page in each process that gets them (each process with a surface, each terminal, the compositor, a process from a disk). It keeps no handle for each process.
The compositordisplay.script_coverage_tellWrites what each fallback chain lacks, once at each boot.
The shaper and the drawtext_rendering.Spacing, graphics.text_proportional, text_scaled, text_bold, characterA character of the 192 is the placed glyph of its character index; a character past them that the chain has is FALLBACK_GLYPH_FIRST plus its code point; each has the advance of its font file. The draw takes each glyph from text_rendering.glyph.

13.2 What a process does

  1. 1. At its start, display.text_settings_load opens the font outlines that the starter mapped (text_rendering.open), and gives graphics the faces of the cells. The drawing module does the same in its own copy at its first draw.
  2. 2. A spacing names a face and a text size (text_rendering.spacing_of). The shaper places each character with the advance and the pairs of its font file (section 14.7); a character past the 192 that the chain has is a fallback glyph. Another one is the replacement glyph, with the advance of 0. The measure never depends on a cache, so the measure and the draw of a frame agree. A process uses the interface font only when it opened both of its faces (display.interface_faces_opened): with no outlines, its elements draw in the font of the cells.
  3. 3. Each frame starts with display.text_frame_begin: interface.window_frame_begin, the drawing module and display.present call it, so a process that draws text by hand gets its glyph memory at its first picture.
  4. 4. The draw takes each glyph from the private glyph cache, where it draws it at its first use: 3 to 46 µs, in the frame.

The process never waits for another process. With the setting font at spleen, a cell past the characters of Spleen draws the replacement glyph: a glyph of Paper Mono does not stand beside the glyphs of Spleen 8x16.

13.2.1 What a terminal does

A terminal draws its cells through the drawing module, which draws each glyph into its private glyph cache. A cell of a box-drawing character, a block element or one of the Greek letters Λ, Ω, λ, μ and π draws its glyph of Paper Mono, in the weight and the grid fit of the cells beside it. A Greek letter that Paper Mono lacks draws its glyph of B612, the second font of the chain of the cells, in the frame of Paper Mono: in its cell, on the baseline of the cells. A Cyrillic letter, Π, ρ and a letter of Latin Extended-A draw their glyph of Noto Sans, the last font of the chain, in the same frame. Its log has one line for each font of the first and the last such characters of its view, and one line for a character that no font has:

  • terminal: console shows the character 945 in its cells, drawn by this process from the font b612 of its fallback chain, which the main machine test waits for after character(945) + character(1046) in the console;
  • terminal: console shows the character 1046 in its cells, drawn by this process from the font noto_sans of its fallback chain, after the same;
  • terminal: console shows the character 1120 in its cells as the replacement glyph: no font of its fallback chain has it, after character(1120);
  • terminal: console shows the character 9472 in its cells, drawn by this process from the font paper_mono of its fallback chain, after character(955) + character(9472).

13.2.2 What the caches tell a process

The private glyph cache of a process is in its own memory, and its evictions are inside the process. The font outlines are pages of the boot image that no process writes. So a process learns from no cache what another draws (Kernel properties: No ambient access: the other holes to close, row 17). No process sends a request, so the time of an answer tells nothing either.

13.2.3 The fallback chains, and what they lack

The chains are data (text_rendering.scripts): one row for each script, with the fonts of each face in order. A character takes the first font of its chain that has its glyph; a character of no row takes the default chain of its face.

ScriptInterfaceCells
Greek (U+0391 to U+03C9, 49 letters)B612, Paper Mono, Noto SansPaper Mono, B612, Noto Sans
Cyrillic (U+0400 to U+045F, 96 letters)Noto SansNoto Sans
Box drawing and block elements (U+2500 to U+259F)Paper MonoPaper Mono
Each other character, Latin Extended-A tooB612, Paper Mono, Noto SansPaper Mono, B612, Noto Sans

The bold weights follow the same rows with B612 Bold and Paper Mono SemiBold first. Noto Sans has one weight: a bold Cyrillic letter, Π, ρ or a bold letter of Latin Extended-A draws in its regular weight. A glyph of a font that is not the first of its face is drawn in the frame of the first font: its outlines are scaled so that its cap height is the cap height of the first font, on the baseline of the first font; in a face of cells it is cut to its cell.

The compositor writes one line for each script at its start, with what the chains draw:

  • compositor: the script greek: the chain of the interface draws 49 of its 49 characters, the chain of the cells 49;
  • compositor: the script cyrillic: the chain of the interface draws 96 of its 96 characters, the chain of the cells 96;
  • compositor: the script box drawing: the chain of the interface draws 160 of its 160 characters, the chain of the cells 160.

The process interface_font shows the Greek letters of B612, box-drawing characters from Paper Mono in the interface font, and writes interface_font: each Greek letter of B612 is drawn by this process: 47 letters: as it must, interface_font: the box-drawing characters come from paper_mono, the second font of the chain of the interface: 7 characters: as it must and interface_font: 3 characters that no font of the chain has draw the replacement glyph: as it must.

13.3 What stays built at build time

The subsets, the font outlines, Spleen 8x16 and the boot display are built at build time. No glyph is: the first frame of the compositor, of the terminal and of each window draws its glyphs from the outlines, in its own process, and needs no service.

13.4 The subsets

The subset of B612 Regular holds the Greek letters that its character map has, after the characters of the glyph cache (font_outlines.interface_past_cache_ranges, written by modustool vector_fonts): 47 characters, U+0391 to U+039F, U+03A1, U+03A3 to U+03A9, U+03B1 to U+03C0 and U+03C2 to U+03C9. B612 1.008 has no capital pi (U+03A0), no small rho (U+03C1), no Cyrillic and no Latin Extended-A. The window interface_font shows each of these letters, and its line interface_font: each Greek letter of B612 is drawn by this process: 47 letters: as it must is a line of the machine test.

The subsets of Paper Mono and of Paper Mono SemiBold hold 165 characters past the glyph cache, after the characters of the glyph cache (font_outlines.cell_past_cache_ranges): the box-drawing characters U+2500 to U+257F, the block elements U+2580 to U+259F, and the five Greek letters of Paper Mono, U+039B, U+03A9, U+03BB, U+03BC and U+03C0. Paper Mono has no other Greek letter: a cell of α draws the α of B612, the second font of the chain of the cells. The box-drawing characters of Paper Mono pass their advance by 5 units on each side; the cell cuts them, as it cuts each glyph of the cache of cells.

The subset of Noto Sans, "Noto Sans LGC" (resources/fonts/noto_sans.ttf, SIL OFL 1.1), is the last font of each chain: it holds the 192 characters, whose outlines give its measures, then 273 characters past the glyph cache (font_outlines.script_fallback_past_cache_ranges): Latin Extended-A, U+0100 to U+017F; the 49 Greek letters, U+0391 to U+03A1, U+03A3 to U+03A9 and U+03B1 to U+03C9; the 96 Cyrillic letters, U+0400 to U+045F. Its source is the variable font NotoSans.ttf of the package noto-fonts of nixpkgs: the subset holds the outlines of its default instance, the regular weight, with its 196 glyphs made of glyphs made simple. It has no table kern, so its glyphs have no pair. It is 87 172 bytes.

The 192 characters keep their glyph indices: the characters past them come after them in each subset.

13.5 Who can write the font outlines and the private glyph cache

  • The font outlines are pages of the boot image, whose one handle has no right Write, mapped with the right Read only, after the root service checked their hash and their format (font_outlines.validate). Each record names the hash of its font file.
  • The private glyph cache is memory of the process: only the process writes it, and only the process reads it.

13.6 The pixels

A glyph has the bytes that the build gives to the same character from the same font file: the same style, the same renderer, the same positions. The host test the_glyphs_past_the_192_characters_keep_their_golden_hashes (src/library/modus/text_rendering) draws the 47 Greek letters of B612 for the face Interface and the 165 characters past the 192 of Paper Mono and Paper Mono SemiBold for the faces Cells, Cells_Without_Grid_Fit and Cells_Bold, at the sizes and positions that the demand cache held, and compares the hash of their boxes and words with the stored hash (section 14.5, the golden hash). The hashes come from the first build without the demand cache, whose rasterizer a host test of the build before compared with the demand cache, word for word. The host test a_text_of_a_face_draws_the_pixels_of_its_glyphs (src/library/modus/graphics) draws a text of the face Interface, and each of its glyphs of the face by hand at its third of a pixel, compares the pixels at each third of a pixel, and checks that one changed word of a glyph changes the pixels; a_cell_of_a_face_draws_its_glyph does the same for a cell at each scale, and checks that the ink of a box-drawing character of Paper Mono and of a Greek letter of B612 stays in its cell. The golden hashes prove the words of these glyphs.

13.7 Measures

Host: AMD Ryzen 7 5800X, one core (taskset), -o:speed, each time the least of 200 batches (host test private_glyph_measure, src/library/modus/vector_font; the ideographs with MODUS_MEASURE_DENSE_FONT naming WenQuanYi Micro Hei, a TrueType font of the host, as no font of resources/fonts has a dense script).

One glyph drawn by a processScale 1Scale 2Scale 3Words at scale 1, mean and most
Latin of B612, placed16.2 µs32.4 µs40.2 µs83, 182
Greek of B612, placed16.5 µs31.8 µs46.3 µs97, 135
Latin of Paper Mono, in cells4.1 µs10.3 µs21.1 µs74, 104
Box drawing of Paper Mono, in cells3.3 µs9.7 µs19.7 µs90, 128
500 ideographs, placed18.0 µs29.5 µs43.1 µs198, 224
A working set, with 48 bytes of entry for each glyph300 glyphs3 000 glyphs10 000 glyphs
Latin of B612, scale 1112 KiB1 117 KiB3 723 KiB
Ideographs, scale 1247 KiB2 466 KiB8 222 KiB
Ideographs, scale 31 743 KiB17 430 KiB58 101 KiB
MeasureValue
The private glyph cache, in each copy of text_rendering that draws a glyph1 MiB of words, 4 096 entries of 48 bytes, a Swiss table index of 340 groups (5 440 slots, 16 344 bytes) and the blocks, and about 150 KiB of render memory: about 1.4 MiB (354 pages), one memory object that the process takes from its budget at the frame after its first such glyph (section 14.4)
The globals of each copy of text_renderingabout 25 KiB: the memory of one outline (13 KiB), which the measure needs too, a band of one row (11 KiB), and the state; a copy that only measures carries the outline and the state
The font outlinesthe five subsets: about 282 KB in the boot image

These measures are of the rasterizer that drew the glyph cache files that left the system (vector_font.glyph_render_placed, which the host test private_glyph_measure still measures): there a placed glyph costs about four times a glyph of cells, because glyph_render_placed clears and filters a work row of 64 pixels whatever the width of the glyph. The rasterizer of each process has a work row as wide as the glyph (section 14.3); its measures are in section 14.6.

13.8 What is left

A TrueType font for the CJK ideographs, with a cell of two columns; the shaping of complex scripts in the process: ROADMAP.md.

14. Text at any size

The package src/library/modus/text_rendering draws each glyph of a face at any text size, into the private glyph cache of the copy that draws: every glyph of the system, the 192 characters too. A draw record carries the text size of its text and of its text grid (The interface of the processes: Text); the elements of the desktop still give the sizes 16, 32 and 48. The intent of this design is Text rendering: one module for text at any size in the repository.

14.1 The text size

The text size is the height of the line of a face, in 1/64 of a pixel: a line of 16 pixels is the size 1 024, and the scales 1, 2 and 3 are the sizes 1 024, 2 048 and 3 072 (size_of_scale). A size from 256 (a line of 4 pixels) to 16 384 (a line of 256 pixels) is valid. size_check refuses 0 (Zero), a size below 256 (Too_Small) and a size past 16 384 (Too_Large); it never clamps. A refused size gives no advance and no glyph. The border of the draw record refuses the same sizes in a text and in a text grid (draw_record.TEXT_SIZE_MINIMUM, draw_record.TEXT_SIZE_LIMIT), and a constant check ties the two bounds.

A cell of a face of cells at a size is half the size wide, rounded to a whole pixel with a half up (cell_columns), and a line of the cells is two cells high: 7 by 14 at a size of 14, 8 by 16 at 16, 12 by 24 at 24. graphics.text_sized draws a text of the cells at any size, in the regular or the bold weight; with Spleen it draws each glyph at the largest whole scale whose line is not above the line of the cell, 1 under it, in the middle of the cell. The replacement glyph is the box of the body grown with the cell (graphics.character_replacement_sized), so at a whole scale it is the box of before.

14.2 The frame of a face

FaceIts frameAt the size 1 024
A face of cells (Paper Mono, Paper Mono SemiBold)The advance of the font is half the line606 units are 8 pixels
A face of the interface (B612, B612 Bold)The cap height of the font is 10/16 of the line1 500 units are 10 rows

A length of the font at a size is units * size / (2 * units of a cell) in 1/64 of a pixel, rounded to the nearest integer, a half up (units_at_size): at the sizes of the glyph caches it is the advance of the glyph caches. A cell of a face of cells is half the line, rounded to whole pixels, a half up (cell_columns). The baseline puts the middle of the ink of the first font at the middle of the line (baseline_of).

14.3 The rasterizer

The exact area in integers of section 4, with the filter of five taps, the words 0xGGRRGGBB and the grid fit of section 2 at each size. Two changes from the rasterizer of the glyph caches, which change no word:

  • The work row is as wide as the glyph. The points of the outline give the columns that the ink can touch, with the spread of the filter and one pixel more on each side. The box is computed in 64 bits from the placement. A glyph is refused as hostile when it is wider than 512 pixels, when a point is placed past 2^29 subunits from its origin, or when its columns pass an i16 from its origin, the bound of the left side of a glyph entry.
  • The rows are drawn in bands of 8 rows. Each band adds the whole outline, moved up by whole rows, so the memory has a bound at any size.

The outline keeps the placement of the glyph caches; each move is added to the ends of each segment after the points are computed (vector_font.Accumulation, move_x and move_y), because the point between two points off the curve rounds toward zero and would round the other way at a negative coordinate.

A proportional glyph is at the nearest third of a pixel at each size: three positions. A glyph of cells is at a whole pixel, cut to its cell. The ink of a glyph is cut to its line.

14.4 The private glyph cache

BoundValue
The words262 144 words (1 MiB), in runs of 32 to 16 384 words that split and join by halves
The entries4 096, in a table of 8 192 places
The key64 bits: the face (4 bits), the font of the chain (4), the glyph index in that font (16), the text size (16), the position (2); a glyph index past 0xFFFF has no key and no glyph
The memoryThe glyph memory: the cache and the render memory, about 1.4 MiB (354 pages, display.TEXT_MEMORY_PAGES), no global. The first glyph of a copy is drawn band by band through a band of one row (Glyph_Source.Banded); the next display.text_frame_begin takes one memory object of those pages from the budget of the process and gives it (text_rendering.memory_give). A refused reservation is not tried again: each glyph is then drawn band by band, and a process writes one line on its log. Each stated budget of a process that draws text holds 354 pages for each copy that draws: the drawing module, and the own copy of a process that draws by hand

A new glyph that finds no room evicts the glyphs of the oldest frames. A glyph of the frame in progress is never evicted: when the glyphs of one frame fill the cache, each other new glyph of that frame is drawn into the render memory, blended, and not kept (Glyph_Source.Not_Kept). Its pixels are right; the frame costs more time. The first such frame of a copy in a process writes one line on the log of the process, at the start of the next frame (display.text_not_kept_tell, which interface.window_frame_begin and the terminal call). The line:

text_rendering: the glyphs of one frame fill the private glyph cache: <n> glyphs drawn and not kept

The copy in the drawing module counts its glyphs and writes no line: the parts of a line of the log hold the addresses of their texts, and a library module holds no table of addresses.

A glyph larger than 16 384 words (a glyph of 128 by 128 pixels) is never kept (Glyph_Source.Banded): the draw takes its rows band by band (glyph_bands, band_next) and blends each band.

14.5 The proof of the pixels

The golden hash. The host test the_192_characters_keep_their_golden_hashes (src/library/modus/text_rendering) draws the 192 characters of each face at the sizes that its glyph cache of the boot image held (1 024, 2 048 and 3 072; 1 024 for the bold weights), at each position (three for a face of the interface), computes the BLAKE3 hash of the box of each glyph (four numbers of 32 bits) and of its words, all in little endian, by their character index, and compares it with the hash stored in the table golden_hashes of the test: 21 rows. The hashes of the 192 characters come from the last build that had the glyph caches, whose test compared each word with the code that built them. A hash that differs fails with the face, the size and the hash found. The test the_glyphs_past_the_192_characters_keep_their_golden_hashes does the same for the characters past them (section 13.6). Each prints its lines, text_rendering: the golden hash of <Face> at the size <n>: <hash> and text_rendering: the golden hash of <Face> at the size <n>, past the 192 characters: <hash>. The tests build no glyph cache: these hashes are the proof that the pixels did not change. The host test a_golden_hash_refuses_and_sees_one_pixel checks the proof itself: a face that names no member, the face None, a size that the text rendering refuses and a size that no row names give no hash, and one changed pixel of the 192 characters of Cells at the size 1 024 gives another hash than the stored one.

The faces of the interface draw at three positions at each size: at 2 048 and 3 072 the caches of the boot image held one, so a text of the interface font at the scales 2 and 3 now stands at most 1/6 pixel from its place, not 1/2.

The host test the_measure_is_the_draw checks, for each face at six sizes, that the x of each placed glyph is the sum of the advances of the font file before it, and that the fit of a room is the start whose measure is that room.

14.6 Measures

Each one is a measure, never a test.

MeasureCommand
The raster of one glyph of each face at the lines of 16, 20, 24 and 32 pixels, the least of 200nix develop -c taskset -c 2 odin test src/library/modus/text_rendering -vet -collection:modus=src/library/modus -o:speed -define:MEASURE=true -define:ODIN_TEST_NAMES=text_rendering.the_raster_time_of_one_glyph
The glyphs of the frame that fills the cachethe same, with ODIN_TEST_NAMES=text_rendering.a_frame_larger_than_the_cache
The measure of 100 lines of B612 from the font file, the least of 200the same, with ODIN_TEST_NAMES=text_rendering.the_measure_time_of_a_hundred_lines
One call of shape_text of the library module on a label, the open of the fonts of its face included, the least of 200nix develop -c taskset -c 2 odin test src/modules/libraries/text_rendering -vet -collection:modus=src/library/modus -o:speed -define:MEASURE=true -define:ODIN_TEST_NAMES=text_rendering_module.the_time_of_one_call
The start of a window, from Process_Start to its first frame: the first frame draws each glyph of the window from its outlinenix develop -c modustool measure, then grep "compositor: measure: the start of the window" build/test_output_measure.txt; for interface_elements and settings, the same line in build/test_output.txt after nix develop -c modustool screenshots
The draw table of processor_frame with a warm cache (one frame before the 21 counted draws each glyph)nix develop -c modustool measure, then grep "processor_frame: measure: " build/test_output_measure.txt
The start of the machine: the hash check of each resource by the root servicegrep "root: the resource" build/test_output.txt after nix develop -c modustool screenshots; the five glyph caches had a line each, the font outlines have one
One line of B612 drawn, its first draw (each glyph from its outline) and the least of 50 after itgrep "interface_font: one line of" build/test_output.txt after nix develop -c modustool screenshots

The measures of time run only with -define:MEASURE=true: a normal run of the host tests skips them and prints no time.

14.7 The measure from the font file

Each number of a measure comes from the font file of the face, at the text size of the spacing (text_rendering.spacing_of(face, size)), never from a glyph cache:

  • The advance of a glyph is the advance of the table hmtx of its font, scaled to the frame of the face and rounded once to 1/64 of a pixel. A face of cells gives each character half the line.
  • The pair of two glyphs that follow each other is the pair of the table kern (format 0) of their font, scaled and rounded the same way, when both glyphs come from one font of the chain of a proportional face. Two glyphs of two fonts, and a face of cells, have no pair. A spacing with without_pairs places a text with its advances alone.
  • The bounds hold at any size. An advance is kept from 0 to one line, and a pair within half a line on each side: the widest advance of the fonts of the system is 2 000 units of B612 against a line of 2 400, and the largest pair 200 units. A font that states more is hostile; its numbers are kept in these bounds, so the x of the last glyph of a text of 65 536 bytes at the largest size stays in an i32.
  • The same numbers as the glyph caches. At the sizes of the scales 1, 2 and 3, the sizes that the glyph caches held, the host test the_measure_of_the_font_file_is_the_measure_of_the_grid compares each advance of the 192 characters and each pair of two of them, in B612 Regular and Bold, with the length that the arithmetic of the grid gives from the units of the same font file, units * 8 * scale * 64 / units of a cell, rounded once: the arithmetic that drew the tables of the glyph caches. No place of a text moves.
  • Past the 192 characters, a pair of a character of the glyph cache and one past it counts when both are in one font: a Greek letter of B612 beside a Latin letter of B612 takes the pair of the file, when the file has one.

The boot image holds no glyph cache: each glyph of the system comes from the private glyph cache of the process that draws it. The glyph cache file, its builder and the tests that take it as their reference are in ROADMAP.md.

Error_Record struct

A struct of the package errors: 56 bytes, aligned on 8 bytes, 0 bytes of padding. The error record: what a call that failed says about why, as seven integers.

  • kindi6408 bytes
  • uniti6488 bytes
  • operationi64168 bytes
  • argumenti64248 bytes
  • valuei64328 bytes
  • limiti64408 bytes
  • foundi64488 bytes

text procedure of the package graphics

text :: proc "contextless" (canvas: Canvas, x, y: int, characters: string, color: Color) -> int

text draws characters from (x, y), the top left corner of the first cell,.

src/library/modus/graphics/text.odin:227

character procedure of the package graphics

character :: proc "contextless" (canvas: Canvas, x, y: int, value: rune, color: Color)

character draws one character in the cell at (x, y), at the size of the.

src/library/modus/graphics/text.odin:277

unsigned procedure of the package graphics

unsigned :: proc "contextless" (canvas: Canvas, x, y: int, value: u64, color: Color, minimum_digits := 1) -> int

unsigned draws a number, and gives the x after it.

src/library/modus/graphics/graphics.odin:144

present procedure of the package display

present :: proc "contextless" (window: ^Window) -> bool

present tells the compositor that the picture in window.canvas is.

src/library/modus/display/display.odin:878

write_large procedure of the package bootscreen

write_large :: proc "contextless" (area: Area, x, y: int, characters: string, color: graphics.Color) -> int

write_large draws characters in cells of twice the size of a cell: the.

src/library/modus/bootscreen/bootscreen.odin:367

text_scaled procedure of the package graphics

text_scaled :: proc "contextless" (canvas: Canvas, x, y: int, characters: string, color: Color, scale: int, alpha: u32 = OPAQUE) -> int

text_scaled draws characters at a whole scale of the body: the text size.

src/library/modus/graphics/text.odin:293

text_draw procedure of the package interface

text_draw :: proc "contextless" (canvas: graphics.Canvas, x, y: int, text: string, color: graphics.Color, size: int, weight: Font_Weight = .Regular, alpha: u32 = graphics.OPAQUE, spleen_advance := 0)

text_draw draws characters of the font of the cells at a text size in.

src/library/modus/interface/execute.odin:551

text_sized procedure of the package graphics

text_sized :: proc "contextless" (canvas: Canvas, x, y: int, characters: string, color: Color, size: int, bold := false, alpha: u32 = OPAQUE, spleen_advance := 0) -> int

text_sized draws characters in the cells of a text size in 1/64 pixel.

src/library/modus/graphics/text.odin:348

draw_text procedure of the package interface

draw_text :: proc "contextless" (table: ^Draw_Table, x, y: int, text: string, color: graphics.Color, font: Font = {}, element: u32 = 0) -> int

draw_text appends a run of text at (x, y), the top left corner of its.

src/library/modus/interface/draw_table.odin:927

glyph_style_of procedure of the package vector_font

glyph_style_of :: proc "contextless" (measures: Font_Measures, cell_width, cell_height: int, grid_fit: bool, filter := Stripe_Filter.Five_Taps) -> Glyph_Style

glyph_style_of places a font in a cell of cell_width x cell_height pixels:.

src/library/modus/vector_font/glyph.odin:205

place_y procedure of the package vector_font

place_y :: proc "contextless" (placement: ^Placement, y: i32) -> i32

A procedure with no comment in its source.

src/library/modus/vector_font/glyph.odin:72

blend_coverage_row procedure of the package graphics

blend_coverage_row :: proc "contextless" (line: [^]Color, words: [^]u32, first, last: int, color: Color, order: Subpixel_Order, square_root: ^[4096]u8, alpha: u32 = OPAQUE)

blend_coverage_row blends a color over the pixels of one row of a canvas,.

src/library/modus/graphics/blend.odin:109

blend_premultiplied_alpha procedure of the package graphics

blend_premultiplied_alpha :: proc "contextless" (canvas: Canvas, x, y: int, source: Canvas)

blend_premultiplied_alpha draws source over canvas at (x, y), cut to the.

src/library/modus/graphics/blend.odin:38

RENDERER_VERSION constant of the package vector_font

RENDERER_VERSION :: 1

The version of the renderer: a change of the pixels that the renderer.

src/library/modus/vector_font/glyph.odin:32

Glyph_Entry type of the package text_rendering

Glyph_Entry :: struct #packed {...}

Glyph_Entry: one drawn glyph, the box of its words.

src/library/modus/text_rendering/private_cache.odin:63

CONTEXT_VALUE_FIXED_RANGES_MAPPED constant of the package operation

CONTEXT_VALUE_FIXED_RANGES_MAPPED :: 20

The value 20: a set of bits, bit n for the member n of the fixed ranges.

src/library/modus/contract/operation/operation.odin:3896

validate_at procedure of the package font_outlines

validate_at :: proc "contextless" (address: uintptr, span: u64) -> (outlines: Outlines, problem: Problem)

validate_at checks the resource that a starter mapped at an address: the.

src/library/modus/contract/font_outlines/font_outlines.odin:239

text_settings_give procedure of the package root

text_settings_give :: proc "contextless" (mappings: []system.Mapping, count: ^int, values: ^system.Context_Values)

text_settings_give adds the settings page and the font outlines,.

src/modules/system/root/text_settings.odin:80

choice_of_values procedure of the package settings

choice_of_values :: proc "contextless" (values: [Setting]u32) -> (choice: Choice, refused: Setting, ok: bool)

choice_of_values is the border of the words of the settings: the choice.

src/library/modus/contract/settings/settings.odin:558

zone_offset_minutes_valid procedure of the package settings

zone_offset_minutes_valid :: proc "contextless" (minutes: i32) -> i32

zone_offset_minutes_valid gives the zone, or the default 0 (UTC) for a.

src/library/modus/contract/settings/settings.odin:301

read procedure of the package settings

read :: proc "contextless" (page: ^Page) -> (choice: Choice, ok: bool)

read copies the choice of a page that another process writes.

src/library/modus/contract/settings/settings.odin:696

values_differ procedure of the package settings

values_differ :: proc "contextless" (first, second: Choice) -> bool

values_differ tells whether two choices have different values, a.

src/library/modus/contract/settings/settings.odin:676

font_file_open procedure of the package text_rendering

font_file_open :: proc "contextless" (set: ^Font_Set, font: Outline_Font, bytes: []u8, outline: ^vector_font.Outline) -> (problem: vector_font.Font_Problem)

font_file_open opens one font file as a font of a set, with the memory.

src/library/modus/text_rendering/text_rendering.odin:353

character_of_set procedure of the package graphics

character_of_set :: proc "contextless" (set: ^text_rendering.Font_Set, face: text_rendering.Face, canvas: Canvas, x, y: int, character: rune, color: Color, size: int) -> bool

character_of_set draws a character of a face of a set of fonts that the.

src/library/modus/graphics/text.odin:151

blend_glyph_rows procedure of the package graphics

blend_glyph_rows :: proc "contextless" (canvas_row: [^]Color, stride: int, words: [^]u32, width, first_row, last_row, first, last: int, color: Color, order: Subpixel_Order, square_root: ^[4096]u8, tables: ^Blend_Tables, alpha: u32 = OPAQUE)

blend_glyph_rows draws the rows of a glyph with the fast blend: the same.

src/library/modus/graphics/blend.odin:370

Blend_Tables type of the package graphics

Blend_Tables :: struct {...}

Blend_Tables: a few tables, the one replaced next in turn.

src/library/modus/graphics/blend.odin:328

blend_coverage_row_in_form_of_target procedure of the package graphics

blend_coverage_row_in_form_of_target :: #force_inline proc "contextless" (line: [^]Color, words: [^]u32, first, last: int, color: Color, $ORDER: Subpixel_Order, square_root: ^[4096]u8, alpha: u32)

blend_coverage_row_in_form_of_target blends one row in the form of the.

src/library/modus/graphics/blend.odin:136

three_blends_give_the_same_bytes_for_each_face procedure of the package graphics

three_blends_give_the_same_bytes_for_each_face :: proc(t: ^testing.T)

The three blends of a glyph give the same bytes: the table blend of the.

src/library/modus/graphics/blend_vectors_test_amd64.odin:640

Cells type of the package kind_icons

Cells :: [ICON_SIZE]string

The cells of one icon: 12 rows of 12 characters, from the top.

src/library/modus/kind_icons/kind_icons.odin:23

text_speed_of_each_blend procedure of the package graphics

text_speed_of_each_blend :: proc(t: ^testing.T)

The time of one glyph at scale 1 of Paper Mono in each blend, over a.

src/library/modus/graphics/blend_vectors_test_amd64.odin:709

COMPOSITE_DEPTH constant of the package vector_font

COMPOSITE_DEPTH :: 4

A glyph made of glyphs can name glyphs made of glyphs: at most this deep.

src/library/modus/vector_font/parse.odin:86

COMPOSITE_PART_LIMIT constant of the package vector_font

COMPOSITE_PART_LIMIT :: 64

The parts of one outline, in all its levels together.

src/library/modus/vector_font/parse.odin:91

single_substitution procedure of the package vector_font

single_substitution :: proc "contextless" (font: ^Font_File, tag: Feature_Tag, glyph: int) -> (substitute: int, problem: Font_Problem)

single_substitution gives the glyph that the feature tag puts in the.

src/library/modus/vector_font/substitution.odin:49

PAGE_ADDRESS constant of the package settings

PAGE_ADDRESS :: fixed_addresses.SETTINGS_PAGE_ADDRESS

Where a process maps the settings page.

src/library/modus/contract/settings/settings.odin:67

Settings_Changed type of the package compositor

Settings_Changed :: struct {...}

The settings changed: the values, the appearance in force, the time zone,.

src/modules/system/compositor/facts.odin:1025

window_frame_begin procedure of the package interface

window_frame_begin :: proc "contextless" (drawing: ^Window_Drawing, window: ^display.Window) -> Frame

window_frame_begin starts a frame of the window.

src/library/modus/interface/window_drawing.odin:518

text_settings_apply procedure of the package display

text_settings_apply :: proc "contextless" () -> (changed: bool)

text_settings_apply gives the choice of the settings page to.

src/library/modus/display/display.odin:1583

descriptions global variable of the package settings

descriptions := [Setting]Description {...}

The description of each setting.

src/library/modus/contract/settings/settings.odin:216

pointer_theme global variable of the package compositor

pointer_theme: []u8

A theme file that pointer_pictures.validate accepted, or nil.

src/modules/system/compositor/pointer_picture.odin:72

pointer_theme_choice procedure of the package root

pointer_theme_choice :: proc "contextless" () -> []string

pointer_theme_choice gives the names of the pointer theme files that the.

src/modules/system/root/resources.odin:42

pointer_theme_choose procedure of the package compositor

pointer_theme_choose :: proc "contextless" (setting: settings.Pointer_Theme)

pointer_theme_choose takes the theme of the setting: the first theme of.

src/modules/system/compositor/pointer_picture.odin:174

cell_faces global variable of the package display

cell_faces := [settings.Grid_Fit]text_rendering.Face {...}

The face of the cells of each value of the setting "grid_fit".

src/library/modus/display/display.odin:1561

word_of_value procedure of the package settings

word_of_value :: proc "contextless" (setting: Setting, place: int) -> u32

word_of_value gives the word of the value at a place of a setting.

src/library/modus/contract/settings/settings.odin:230

Locale type of the package language_tag

Locale :: struct {...}

Locale: a language tag as a record.

src/library/modus/contract/language_tag/locale.odin:33

language_list_valid procedure of the package settings

language_list_valid :: proc "contextless" (list: Language_List) -> (problem: Language_List_Problem, place: int, locale_problem: language_tag.Locale_Problem)

language_list_valid is the border of a list that another process wrote:.

src/library/modus/contract/settings/settings.odin:384

Locale_Problem type of the package language_tag

Locale_Problem :: enum u8 {...}

Why tag_read refuses a text, or locale_valid a record.

src/library/modus/contract/language_tag/locale.odin:53

Kept_Settings type of the package settings

Kept_Settings :: struct {...}

A type with no comment in its source.

src/library/modus/contract/settings/settings.odin:777

Font_Problem type of the package vector_font

Font_Problem :: enum u8 {...}

What is wrong with a font file or with a glyph.

src/library/modus/vector_font/parse.odin:22

character_replacement procedure of the package graphics

character_replacement :: proc "contextless" (canvas: Canvas, x, y: int, color: Color, scale: int, alpha: u32 = OPAQUE, square_root: ^[4096]u8 = nil)

character_replacement draws the replacement glyph in the cell at (x, y).

src/library/modus/graphics/text.odin:243

shape_text procedure of the package text_rendering_module

shape_text :: proc "c" (outlines: ^system.Bytes_To_Read, face: i64, size: i64, text: ^system.Bytes_To_Read, placed: ^system.Table_To_Append(text_rendering.Placed_Glyph), error: ^errors.) -> i64

shape_text appends the placed glyphs of a UTF-8 text in a face at a text size, measured from the font files of the outlines: one for each character, x from the origin of the text and the advance with the pair adjustment of the font, in 1/64 of a pixel, and the first byte of the character as its cluster.

src/modules/libraries/text_rendering/text_rendering.odin:104

measure_texts procedure of the package text_rendering_module

measure_texts :: proc "c" (outlines: ^system.Bytes_To_Read, face: i64, size: i64, text: ^system.Bytes_To_Read, ranges: ^system.Table_To_Change(text_rendering.Text_Range), error: ^errors.) -> i64

measure_texts writes the width of each text of a table of ranges into one table of bytes, in a face at a text size, in 1/64 of a pixel: a window measures all its labels in one call.

src/modules/libraries/text_rendering/text_rendering.odin:135

break_text procedure of the package text_rendering_module

break_text :: proc "c" (outlines: ^system.Bytes_To_Read, face: i64, size: i64, text: ^system.Bytes_To_Read, room: i64, lines: ^system.Table_To_Append(text_rendering.Text_Range), error: ^errors.) -> i64

break_text appends the lines of a UTF-8 text in a box of room, in a face at a text size: each line as a range of the text (its first byte, its bytes with no space at its end, and its width in 1/64 of a pixel).

src/modules/libraries/text_rendering/text_rendering.odin:165

Text_Range type of the package text_rendering

Text_Range :: struct {...}

Text_Range: one text of a table of bytes, and its width, which the.

src/library/modus/text_rendering/shaping.odin:67

Face type of the package text_rendering

Face :: enum u8 {...}

A face: a first font, its frame, its weight and the grid fit.

src/library/modus/text_rendering/text_rendering.odin:143

validate procedure of the package font_outlines

validate :: proc "contextless" (bytes: []u8) -> (outlines: Outlines, problem: Problem)

validate checks a resource: its header, then each record: its name, and.

src/library/modus/contract/font_outlines/font_outlines.odin:191

font_open procedure of the package vector_font

font_open :: proc "contextless" (bytes: []u8, directory: int = 0) -> (font: Font_File, problem: Font_Problem)

font_open finds the tables of a font file.

src/library/modus/vector_font/parse.odin:139

REPLACEMENT_GLYPH constant of the package text_rendering

REPLACEMENT_GLYPH :: max(u32)

The glyph of a character that no font of the chain has, and of each.

src/library/modus/text_rendering/shaping.odin:35

sum_words procedure of the package sample

sum_words :: proc "c" (words: ^system.Table_To_Change(Word), text: ^system.Bytes_To_Read, error: ^errors.) -> i64

sum_words writes in each word the sum of the bytes of the text that the word names, and gives the sum of all.

src/modules/demonstrations/sample/sample.odin:246

glyph_render_placed procedure of the package vector_font

glyph_render_placed :: proc "contextless" (font: ^Font_File, measures: Font_Measures, style: Glyph_Style, character: rune, position, position_count: int, memory: ^Render_Memory) -> (box: Placed_Box, problem: Font_Problem)

glyph_render_placed draws the glyph of one character with its origin at.

src/library/modus/vector_font/placed.odin:83

PROPORTIONAL_CAP_HEIGHT_ROWS constant of the package vector_font

PROPORTIONAL_CAP_HEIGHT_ROWS :: 10

The cap height at scale 1, in rows of the line of 16 (The text of the system: a vector font with subpixel bands,.

src/library/modus/vector_font/placed.odin:11

Font_Kind type of the package interface

Font_Kind :: draw_record.Font_Kind

The fonts that the package can measure.

src/library/modus/interface/text.odin:18

execute procedure of the package interface

execute :: proc "contextless" (table: ^Draw_Table, canvas: graphics.Canvas, origin_x: int = 0, origin_y: int = 0)

execute draws each record of a table into a canvas, in order.

src/library/modus/interface/execute.odin:11

label_value_line procedure of the package interface

label_value_line :: proc "contextless" (frame: ^Frame, area: Area, label, value: string, value_color: Maybe(graphics.Color) = nil, value_x := 0)

label_value_line draws a name in the dim color and its value: at.

src/library/modus/interface/elements.odin:105

Text_Grid type of the package interface

Text_Grid :: struct {...}

A grid of text cells: rows lines of columns cells, a line each stride.

src/library/modus/interface/draw_table.odin:87

text_proportional procedure of the package graphics

text_proportional :: proc "contextless" (canvas: Canvas, place: i64, y: int, placed: []text_rendering.Placed_Glyph, face: text_rendering.Face, size: int, color: Color, alpha: u32 = OPAQUE)

text_proportional draws the placed glyphs of a text of a proportional.

src/library/modus/graphics/text.odin:503

position_of procedure of the package text_rendering

position_of :: proc "contextless" (place: i64, position_count: int) -> (pixel: i64, position: int)

position_of gives the whole pixel and the position of a place of text in.

src/library/modus/text_rendering/text_rendering.odin:176

glyph procedure of the package text_rendering

glyph :: proc "contextless" (face: Face, character: rune, size, position: int) -> (entry: Glyph_Entry, words: [^]u32, source: Glyph_Source)

glyph gives the glyph of a character of a face at a text size and a.

src/library/modus/text_rendering/text_rendering.odin:628

glyph_words_draw procedure of the package graphics

glyph_words_draw :: proc "contextless" (entry: text_rendering.Glyph_Entry, words: [^]u32, square_root: ^[4096]u8, tables: ^Blend_Tables, order: Subpixel_Order, canvas: Canvas, x, y: int, color: Color, alpha: u32 = OPAQUE) #no_bounds_check

glyph_words_draw draws one glyph from its first word with the fast.

src/library/modus/graphics/text.odin:410

PROPORTIONAL_INK_MARGIN constant of the package graphics

PROPORTIONAL_INK_MARGIN :: 2

The ink of a text of a proportional font can pass the box that its.

src/library/modus/graphics/text.odin:491

proportional_text_gives_the_same_bytes_in_each_blend procedure of the package graphics

proportional_text_gives_the_same_bytes_in_each_blend :: proc(t: ^testing.T)

The text of a proportional face, drawn with text_proportional_with from.

src/library/modus/graphics/blend_vectors_test_amd64.odin:766

text_faces_use procedure of the package graphics

text_faces_use :: proc "contextless" (cells, bold: text_rendering.Face)

text_faces_use makes two faces the faces of the cells and of the bold.

src/library/modus/graphics/text.odin:67

interface_font_open procedure of the package display

interface_font_open :: proc "contextless" (ctx: ^system.Context) -> (font: Interface_Font, ok: bool)

interface_font_open says if this process draws its elements in the.

src/library/modus/display/display.odin:1516

interface_faces_opened procedure of the package display

interface_faces_opened :: proc "contextless" () -> bool

interface_faces_opened says if this copy of.

src/library/modus/display/display.odin:1506

font_in_use procedure of the package interface

font_in_use :: proc "contextless" (table: ^Draw_Table, font: Font, text_length: int) -> Font

font_in_use gives the font that draws a text of a table: an Interface.

src/library/modus/interface/text.odin:122

text_measured_width procedure of the package interface

text_measured_width :: proc "contextless" (table: ^Draw_Table, font: Font, text: string) -> int

text_measured_width gives the width of a text in pixels, in the font that the.

src/library/modus/interface/text.odin:171

texts_measure procedure of the package interface

texts_measure :: proc "contextless" (table: ^Draw_Table, font: Font, texts: []string, widths: []int)

texts_measure gives the width of each text of a list, in one call: the.

src/library/modus/interface/text.odin:181

measured_size procedure of the package interface

measured_size :: proc "contextless" (table: ^Draw_Table, font: Font, text: string) -> Size

measured_size gives the width of a text in the font that the table draws it.

src/library/modus/interface/text.odin:204

interface_font_load procedure of the package display

interface_font_load :: proc "contextless" (ctx: ^system.Context)

interface_font_load finds the interface font of this process once:.

src/library/modus/display/display.odin:1536

Layout type of the package bar

Layout :: struct {...}

Layout: the width of the widest name of the start menu, measured in the.

src/library/internal/compositor/bar/bar.odin:172

button_at procedure of the package bar

button_at :: proc "contextless" (layout: Layout, point_x, point_y: int) -> Bar_Button

button_at gives the button of the bar at a point.

src/library/internal/compositor/bar/bar.odin:534

line_at procedure of the package bar

line_at :: proc "contextless" (layout: Layout, point_x, point_y: int) -> int

line_at gives the index of the line of the start menu at a point, or -1.

src/library/internal/compositor/bar/bar.odin:373

windows_line_at procedure of the package bar

windows_line_at :: proc "contextless" (layout: Layout, count, point_x, point_y: int) -> int

windows_line_at gives the index of the line of the menu of count windows.

src/library/internal/compositor/bar/bar.odin:479

measure_run procedure of the package system

measure_run :: proc "contextless" () -> bool

measure_run says if this process runs for a measure: its starter wrote 1.

src/library/modus/system/measure_run.odin:14

face_opened procedure of the package text_rendering

face_opened :: proc "contextless" (face: Face) -> bool

face_opened says if this copy can draw a face: the outlines are open and.

src/library/modus/text_rendering/text_rendering.odin:386

Private_Cache type of the package text_rendering

Private_Cache :: struct {...}

A type with no comment in its source.

src/library/modus/text_rendering/private_cache.odin:84

frame_begin procedure of the package text_rendering

frame_begin :: proc "contextless" ()

frame_begin starts a frame of the process: the order of use of the.

src/library/modus/text_rendering/text_rendering.odin:394

script_coverage_tell procedure of the package display

script_coverage_tell :: proc "contextless" (caller: string)

script_coverage_tell writes, for each script of the fallback chains, how.

src/library/modus/display/fallback.odin:37

Spacing type of the package text_rendering

Spacing :: struct {...}

Spacing: what places the characters of a text.

src/library/modus/text_rendering/shaping.odin:76

text_bold procedure of the package graphics

text_bold :: proc "contextless" (canvas: Canvas, x, y: int, characters: string, color: Color, alpha: u32 = OPAQUE) -> int

text_bold draws characters at the size of the body in the bold weight of.

src/library/modus/graphics/text.odin:85

FALLBACK_GLYPH_FIRST constant of the package text_rendering

FALLBACK_GLYPH_FIRST :: u32(1) << 24

The glyph of a character with no character index that the fallback chain.

src/library/modus/text_rendering/shaping.odin:40

text_settings_load procedure of the package display

text_settings_load :: proc "contextless" (ctx: ^system.Context) -> (problems: Text_Settings_Problems, loaded: bool)

text_settings_load does the work of text_settings_open and writes no.

src/library/modus/display/display.odin:1474

open procedure of the package text_rendering

open :: proc "contextless" (outlines: ^font_outlines.Outlines) -> (missing: Outline_Fonts)

open opens the fonts of the outlines into the state of this copy.

src/library/modus/text_rendering/text_rendering.odin:308

spacing_of procedure of the package text_rendering

spacing_of :: proc "contextless" (face: Face, size: int) -> (spacing: Spacing, ok: bool)

spacing_of gives the spacing of a face at a text size over the fonts.

src/library/modus/text_rendering/shaping.odin:89

text_frame_begin procedure of the package display

text_frame_begin :: proc "contextless" ()

text_frame_begin starts a frame of the text of the process: the order of.

src/library/modus/display/fallback.odin:58

scripts global variable of the package text_rendering

scripts := [Script]Script_Row {...}

The fallback chains by script: the data of the choice of a font.

src/library/modus/text_rendering/text_rendering.odin:252

interface_past_cache_ranges global variable of the package font_outlines

interface_past_cache_ranges := [?]Character_Range {...}

The characters past the glyph cache that the subsets of the outlines.

src/library/modus/contract/font_outlines/font_outlines.odin:56

cell_past_cache_ranges global variable of the package font_outlines

cell_past_cache_ranges := [?]Character_Range {...}

The subsets of Paper Mono and Paper Mono SemiBold: the five Greek.

src/library/modus/contract/font_outlines/font_outlines.odin:69

script_fallback_past_cache_ranges global variable of the package font_outlines

script_fallback_past_cache_ranges := [?]Character_Range {...}

The subset of Noto Sans, the font of the scripts that the fonts of the.

src/library/modus/contract/font_outlines/font_outlines.odin:83

size_of_scale procedure of the package text_rendering

size_of_scale :: #force_inline proc "contextless" (scale: int) -> int

size_of_scale gives the text size of a scale of the grid of cells: 1 024,.

src/library/modus/text_rendering/text_rendering.odin:76

TEXT_SIZE_MINIMUM constant of the package draw_record

TEXT_SIZE_MINIMUM :: 4 * UNITS_PER_PIXEL

The text size of a Text and of a Text_Grid is the height of its line, in.

src/library/modus/contract/draw_record/draw_record.odin:107

TEXT_SIZE_LIMIT constant of the package draw_record

TEXT_SIZE_LIMIT :: 128 * UNITS_PER_PIXEL

A constant with no comment in its source.

src/library/modus/contract/draw_record/draw_record.odin:108

cell_columns procedure of the package text_rendering

cell_columns :: #force_inline proc "contextless" (size: int) -> int

cell_columns gives the width of a cell of a face of cells at a size, in.

src/library/modus/text_rendering/text_rendering.odin:89

character_replacement_sized procedure of the package graphics

character_replacement_sized :: proc "contextless" (canvas: Canvas, x, y: int, color: Color, size: int, alpha: u32 = OPAQUE, square_root: ^[4096]u8 = nil)

character_replacement_sized draws the replacement glyph in the cell at.

src/library/modus/graphics/text.odin:258

units_at_size procedure of the package text_rendering

units_at_size :: #force_inline proc "contextless" (units, size, units_per_cell: int) -> i64

units_at_size gives a length in units of a font in 1/64 of a pixel at a.

src/library/modus/text_rendering/text_rendering.odin:544

baseline_of procedure of the package text_rendering

baseline_of :: proc "contextless" (frame: vector_font.Font_Measures, size: int) -> int

baseline_of gives the row of the baseline of a face at a size: the.

src/library/modus/text_rendering/raster.odin:156

Accumulation type of the package vector_font

Accumulation :: struct {...}

Accumulation: the memory of the caller for the cells of one glyph.

src/library/modus/vector_font/raster.odin:33

TEXT_MEMORY_PAGES constant of the package display

TEXT_MEMORY_PAGES :: (size_of(text_rendering.Glyph_Memory) + system.PAGE_SIZE - 1) / system.PAGE_SIZE

The pages of the glyph memory of one copy of text_rendering.

src/library/modus/display/fallback.odin:66

memory_give procedure of the package text_rendering

memory_give :: proc "contextless" (memory: ^Glyph_Memory)

memory_give makes a memory of the caller the glyph memory of this copy:.

src/library/modus/text_rendering/private_cache.odin:160

text_not_kept_tell procedure of the package display

text_not_kept_tell :: proc "contextless" ()

text_not_kept_tell writes one line on the log of the process, once,.

src/library/modus/display/fallback.odin:117

glyph_bands procedure of the package text_rendering

glyph_bands :: proc "contextless" (face: Face, character: rune, size, position: int) -> (job: Raster_Job, ok: bool)

glyph_bands starts the draw of a glyph band by band: a glyph that is too.

src/library/modus/text_rendering/raster.odin:430

band_next procedure of the package text_rendering

band_next :: proc "contextless" (job: ^Raster_Job) -> (first_row, row_count: int, words: [^]u32)

band_next draws the next band of a job into the band of its memory: its rows.

src/library/modus/text_rendering/raster.odin:319