Expand description
Fonts: a design’s text is set in Inter, which the engine embeds, or in a
font file from the served folder — a .ttf or .otf of one font,
checked as it is read and known by its content, so a scene holds and
sends it once however many texts use it.
Structs§
- Family
- One family’s font files, from a file or a folder: the faces a text’s weight picks from.
- Font
File - A font file, checked: its bytes, its family’s name as its own tables give it, its weights, and whether it is upright.
- FontId
- A font file’s identity: the SHA-256 of its bytes.
Enums§
- Weights
- The weights one font file has.
Constants§
- INTER
- The family name of the embedded font, and its weights.
- INTER_
WEIGHTS - MAX_
FONT_ BYTES - The largest font file a design may use. Every font file a design uses goes whole to each browser that shows it, before the design draws: a whole Latin family, Greek and Cyrillic included, is well under 1 MB, and a larger file covers thousands of characters — Chinese or Japanese — and should be subset to the ones the design shows.
- WEIGHTS
- The weights a text may ask for: 100 to 900 in steps of 100.
Functions§
- is_
font_ name - Whether a file in a font folder is one of its fonts, by its name.
- list
weightsas a sentence’s list:300, 400 and 700.
Type Aliases§
- Font
Files - A scene’s font files by id.