|
| std::shared_ptr< LayoutResult > | create_layout (std::string_view text, float pen_x=0.F, float pen_y=0.F, uint32_t wrap_w=0) |
| | Lay out a UTF-8 string into screen-space glyph quads using the default atlas.
|
| |
| MAYAFLUX_API std::optional< std::string > | find_font (std::string_view family, std::string_view style={}) |
| | Locate a system font file by family name and optional style.
|
| |
| GlyphAtlas & | get_default_atlas () |
| | Return the default GlyphAtlas, or nullptr if set_default_font() has not been called successfully.
|
| |
| ImpressResult | impress (const std::shared_ptr< Buffers::TextBuffer > &target, std::string_view text, glm::vec4 color={ 1.F, 1.F, 1.F, 1.F }) |
| | Append a UTF-8 string into an existing TextBuffer at the current cursor.
|
| |
| bool | initialize (std::optional< Core::TextConfig > config) |
| | Initialize Portal::Text.
|
| |
| void | ink_quads (const std::shared_ptr< Buffers::TextBuffer > &target, std::span< const GlyphQuad > quads, glm::vec4 color) |
| | Rasterize a mutated quad span into an existing TextBuffer.
|
| |
| bool | is_initialized () |
| | Returns true after a successful initialize() call.
|
| |
| LayoutResult | lay_out (std::string_view text, GlyphAtlas &atlas, float pen_x=0.F, float pen_y=0.F, uint32_t wrap_w=0) |
| | Lay out a UTF-8 string into a sequence of screen-space quads.
|
| |
| std::shared_ptr< Buffers::TextBuffer > | press (std::string_view text, const PressParams ¶ms={}) |
| | Composite a UTF-8 string into a new TextBuffer.
|
| |
| void | rasterize_quads (std::span< const GlyphQuad > quads, GlyphAtlas &atlas, glm::vec4 color, uint8_t *dst, uint32_t buf_w, uint32_t buf_h) |
| | Write glyph quads into a caller-provided RGBA8 pixel buffer.
|
| |
| bool | repress (const std::shared_ptr< Buffers::TextBuffer > &target, std::string_view text, glm::vec4 color={ 1.F, 1.F, 1.F, 1.F }, RedrawPolicy policy=RedrawPolicy::Clip) |
| | Re-composite a UTF-8 string into an existing TextBuffer.
|
| |
| bool | set_default_font (const std::string &font_path, uint32_t pixel_size=24, uint32_t atlas_size=512) |
| | Load a font file and create the default GlyphAtlas at a given size.
|
| |
| bool | set_default_font (std::string_view family, std::string_view style, uint32_t pixel_size, uint32_t atlas_size=512) |
| | Locate a system font by family and style, then load it as the default.
|
| |
| void | shutdown () |
| | Shutdown Portal::Text.
|
| |