|
That Terminal
A terminal emulator designed for video making purposes.
|
#include <font_planner.hh>
Classes | |
| struct | Glyph |
Public Member Functions | |
| void | Create (unsigned width, unsigned height, char32_t firstch, char32_t numch) |
| Glyph | LoadGlyph (char32_t ch, unsigned scanline, unsigned render_width) const |
FontPlan manages a set of fonts. Multiple independent instances of this class are allowed.
| struct FontPlan::Glyph |
| void FontPlan::Create | ( | unsigned | width, |
| unsigned | height, | ||
| char32_t | firstch, | ||
| char32_t | numch | ||
| ) |
Initializes a background process (thread) for preparing information to be used by LoadGlyph.
| width | Width of font in pixels |
| height | Height of font in pixels |
| firstch | First unicode codepoint to initialize |
| numch | Number of unicode codepoints to initialize |
Attempts to find the best representation for each glyph in this range, using information in share/fonts/preferences.txt . If a font by the exact requested size is not found, attempts to find closest match.
If the parameters are identical to when the function was last called, does nothing.
| FontPlan::Glyph FontPlan::LoadGlyph | ( | char32_t | ch, |
| unsigned | scanline, | ||
| unsigned | render_width | ||
| ) | const |
Loads glyph for the given codepoint. Waits until the background process started by Create() has finished, if necessary.
| ch | Codepoint to load information for. Should be >= firstch and <= firstch+numch. |
| scanline | Scanline to load. Should be < height. |
| render_width | Width of font in pixels, when it is rendered. |