The entry interface_font
The interface font, B612 Regular and Bold, as the windows draw it. The design: The text of the system: a vector font with subpixel bands: The interface font and the text shaping module. It is placed by src/library/modus/text_rendering and drawn by graphics.text_proportional. It shows a paragraph, three pairs with and without their adjustment, one word at the three positions of a pixel, enlarged, the digits in columns, three lines of characters past the Latin-1 Supplement (Greek letters of B612, box-drawing characters of Paper Mono, the second font of the fallback chain: Glyphs past the glyph cache in the repository), and the time of one line.
The process draws each glyph from the font outlines, a resource of the boot image that the root service maps read-only at its fixed range, into its private glyph cache. The labels of the window are the text of the system.
What it is for. It shows the interface font as the system draws it: text shaping with the pair adjustments of the font, glyphs at a subpixel position, drawn by the process into its private glyph cache, and the fallback chain. A reader compares a pair with and without its adjustment, and one word at three positions of a pixel.
What a reader sees. Start it from the start menu, or with start("interface_font") in the console. The log gets the time of shaping and of drawing one line, then interface_font: ok, B612 Regular and Bold, <count> and <count> pairs, .... After its first frame it writes interface_font: each Greek letter of B612 is drawn by this process: <n> letters: as it must, n the count of the Greek letters of B612, or not each Greek letter of B612 is drawn: ...; then interface_font: the box-drawing characters come from paper_mono, the second font of the chain of the interface: <n> characters: as it must; then interface_font: <n> characters that no font of the chain has draw the replacement glyph: as it must. A line that names a fault starts with interface_font: the fallback chain of the interface is wrong: . With no font outlines that hold B612, it writes interface_font: the boot image gives no font outlines with the interface font.
Its grants: none. The root service maps the font outlines into each process that it starts.
interface_font module with an entry
- Hash
d9db44117007d9fa147a78abd2054dce187ef56b07302af697fc87c9e1c73372- Size
244567 bytes- Exports
0- Imports
0- Imported by
0- License
- MIT
The interface font, B612 Regular and Bold, as the windows draw it
| Fact | Value |
|---|---|
| Kind | Modules with an entry |
| Source | src/modules/demonstrations/interface_font |
| Boot image | yes: in the boot image, 244567 bytes in this build |
| Build settings | none: the defaults of the source |
| Imports | none |
| Imported by | none |
Neighbours
It imports no module, and no module imports it. The module graph shows it with the other modules that have no edge.
Exports
| Export | What it does |
|---|---|
entry() | opens the window, finds the faces of the interface font, reserves the glyph memory, measures one line, writes the lines on the log, then draws the window at each event until the process is stopped |
entry
entry()
entry opens the window, finds the faces of the interface font, reserves the glyph memory, measures one line, writes the lines on the log, then draws the window at each event until the process is stopped. With no window, it stops with Failed.
- Form
- The entry of the module: one parameter, an address, fixed by the contract.
src/modules/demonstrations/interface_font/main.odin:343
Read from the source of the module, as the build reads it to describe the exports (tools/modustool/build/describe.odin).
What the root service gives it
| What | Value | As the root service says |
|---|---|---|
| Grants | none | The interface font, in its window. |
| Other terms of its start grant set | none | |
| Budget that it asks for |
| The glyph memory of its two copies of the text rendering: its own, which draws the lines of B612 and the Greek letters by hand, and the one of the drawing module, which draws its labels. Each reserves its memory at its first glyph. 2 x 354 pages (display.TEXT_MEMORY_PAGES). And the picture of its window, which it draws by hand at its logical size: 800 x 720 pixels of 4 bytes, 563 pages (interface.hand_picture_pages). 708 + 563 = 1271. |
The start grant set is read from start_grant_sets in src/modules/system/root/start_grant_sets.odin. The stated budget is read from the constant MODULE_BUDGET of the source of the module (its line); the build adds the counted parts and writes the sum in the module (tools/modustool/build/budget_count.odin); the root service accepts it up to the largest budget of a process, and adds the limits of processor time and of log records (src/modules/system/root/budgets.odin).
