font-format.layout.text-format |
TextFormat value |
Pass a Font slot, FontFlag bitmask, and nonnegative SkipLines count as TextFormat. |
The exported value type is a fixed 12-byte layout consumed by measurement and drawing. |
Source/Client/FontManager.h |
font-format.layout.wrap-overflow |
Width overflow and wrapping |
With finite width, default layout wraps at the latest space or tab and inserts a line break before an overlong token when no break point exists. |
Layout mutates its cached text copy to establish line boundaries without changing the caller’s source string. |
Source/Client/FontManager.cpp |
font-format.layout.no-wrap-and-truncate |
NoWrap and TruncateLine |
NoWrap ends draw text at the first width overflow; TruncateLine removes overflowing glyphs through the next authored newline. |
These flags intentionally choose different loss behavior and should not be treated as synonyms. |
Source/Client/FontManager.cpp |
font-format.layout.horizontal-alignment |
Horizontal alignment |
CenterX and AlignRight position each line independently inside the supplied rectangle; do not combine contradictory alignment flags. |
The initial and every post-newline X coordinate are recalculated from that line’s measured width. |
Source/Client/FontManager.cpp |
font-format.layout.vertical-alignment |
Vertical alignment |
CenterY centers the visible block and AlignBottom places it against the rectangle bottom using LineHeight and YAdvance. |
Vertical placement depends on the number of lines that fit, not the total source-string byte length. |
Source/Client/FontManager.cpp |
font-format.layout.skip-lines-and-tail |
SkipLines and KeepTail |
SkipLines removes leading lines by default and trailing lines with AlignBottom; KeepTail discards leading overflow so the newest visible lines remain. |
These mechanisms serve pagination and log-tail behavior but use different counters and overflow conditions. |
Source/Client/FontManager.cpp |
font-format.layout.justification |
Justification |
Justify distributes remaining finite rectangle width over breakable spaces on wrapped non-skipped lines. |
Tabs are fixed at four SpaceWidth units and are not justification opportunities. |
Source/Client/FontManager.cpp |
font-format.layout.utf8-and-missing-glyphs |
UTF-8 and missing glyphs |
Invalid UTF-8 sequences map to codepoint zero, which consumes no glyph width and renders nothing; a valid letter that no face carries is drawn as the first face’s missing-glyph box instead. |
The layout maps invalid sequences to codepoint zero and unknown codepoints to zero advance, while letters are rasterized or substituted before layout. |
Source/Client/FontManager.cpp |
font-format.layout.measurement |
Measurement matches layout |
Use Game.GetTextInfo and related line helpers with the same rectangle and TextFormat used for drawing, but do not infer draw-only NoWrap truncation from measurement. |
Measurement and drawing share GetOrFormat, skips, and line metrics; NoWrap truncation is intentionally gated to Draw mode. |
Source/Client/FontManager.cpp, Source/Scripting/ClientGlobalScriptMethods.cpp |
font-format.layout.truetype-no-shaping |
One glyph per codepoint |
Expect TrueType text to be laid out one glyph per codepoint, left to right, with simple kerning pairs only; do not rely on ligatures, combining marks, or bidirectional and complex scripts. |
FontManager measures and draws letters individually, and the rasterizer reads only the kerning FreeType exposes itself. |
Source/Client/FontManager.cpp |