The state of a line iteration. This matches the process of rendering text into an on-screen box: An empty string produces a zero-width line. Each regular, fitting character expands its line horizontally. A newline or wrapping leads to vertical expansion. Word-wrapping happens at "line break
opportunities" (defined by Unicode), or mid-word if there's no other way to fit in the width limit. The iterator honors the width limit if at all possible; the only exception is when a single character is enough to overflow it. The layout calculation is iterative; one may for instance change the width limit between lines.
More...
#include <font.h>
The state of a line iteration. This matches the process of rendering text into an on-screen box: An empty string produces a zero-width line. Each regular, fitting character expands its line horizontally. A newline or wrapping leads to vertical expansion. Word-wrapping happens at "line break
opportunities" (defined by Unicode), or mid-word if there's no other way to fit in the width limit. The iterator honors the width limit if at all possible; the only exception is when a single character is enough to overflow it. The layout calculation is iterative; one may for instance change the width limit between lines.
- See also
- gl_printLineIteratorInit, gl_printLineIteratorNext.
Definition at line 44 of file font.h.
◆ dead
| uint8_t glPrintLineIterator::dead |
Did we emit a line where the text ends?
Definition at line 53 of file font.h.
◆ ft_font
| const glFont* glPrintLineIterator::ft_font |
Font to use.
Definition at line 46 of file font.h.
◆ l_begin
| size_t glPrintLineIterator::l_begin |
◆ l_end
| size_t glPrintLineIterator::l_end |
The current line's location (&text[l_begin], inclusive, to &text[l_end], exclusive).
Definition at line 49 of file font.h.
◆ l_next
| size_t glPrintLineIterator::l_next |
Starting point for next iteration, i.e., l_end plus any spaces that became a line break.
Definition at line 51 of file font.h.
◆ l_width
| int glPrintLineIterator::l_width |
The current line's actual width.
Definition at line 48 of file font.h.
◆ no_soft_breaks
| uint8_t glPrintLineIterator::no_soft_breaks |
Disable word wrapping, e.g. for one-line input widgets.
Definition at line 54 of file font.h.
◆ text
| const char* glPrintLineIterator::text |
Text to split.
Definition at line 45 of file font.h.
◆ width
| int glPrintLineIterator::width |
Maximum width of a line.
Definition at line 47 of file font.h.
The documentation for this struct was generated from the following file:
- /tmp/pkgbuild/games/naev/work.aarch64eb/naev-0.12.5/src/font.h