PanelText
Text drawn from the outlines of its glyphs with the boundary drawer of the program, Windfoil by default, instead of from textures of glyphs. Text is crisp at any scale and in any transform. The work is cached at every step:
faces are loaded once per font, weight and size, by FontFaces, shared with compositions; text is shaped in one face per font and weight and its glyphs are scaled to the size of the text
text is shaped once per face and string, kept for the most recently used maxShapedTexts strings; the shaped text gives both the measures that layout uses and the glyphs that are drawn, so they agree
the outline of every glyph is uploaded to the GPU once, for all sizes, in the glyph map of the boundary drawer that all elements, compositions and other text drawers share, see GlyphMaps
the draw commands of every text an element draws are prepared once in a buffer of their own, in the coordinates of the element; drawing them again, also when the element moved because it scrolled, only draws the buffer. Buffers that were not drawn in a redraw are released after it, see releaseUnused
Types
Functions
The x of the caret before every character of text in a single line in the face of style, and after the last: text.length + 1 positions, kept like the shaping. From the glyphs of the line, which white space has none of: a glyph for every other character, or else for every character of a word, by the glyphs of each word alone; in the words whose glyphs are not one per character, as with ligatures, from the widths of the beginnings of the word
Draws texts with a single draw call, without decorations, for many small texts like the labels of a graph. The draw commands are kept for owner under slot and drawn again as long as the texts, their positions and their colors stay the same, so texts that change often are best batched apart from those that do not.
Draws text in the face of style in box, at horizontalAlign and verticalAlign in it, from 0 at the left and the top to 1 at the right and the bottom; broken into lines at the width of the box when wrap is set and the white space of the style wraps, cut with an ellipsis when it is a single line that does not fit and the text overflow of the style is ellipsis, with the decoration of the style
the face of style: its font family, weight, style and size
text as a single line in the face of style, at horizontalAlign and verticalAlign in box, see drawInBox
releases the buffers of the texts that were not drawn since the last call, after a redraw