FontImageMapDrawer
The FontImageMapDrawer
class facilitates rendering of text based on a font image map. It handles generating text vertex data, applying draw styles, and efficiently managing resources like vertex buffers for text rendering tasks.
This class is designed to support optimized operations such as batching text quads for rendering, efficient memory management, and high-quality glyph rendering with proper kerning and positioning.
Functions
Draws a single line of text at the specified position using the provided drawing context and style.
Draws multiple text strings at specified positions using the provided drawing context and style. The method aligns text with precise position information and applies kerning and text settings based on the given draw style.
Flushes the currently queued drawing commands and renders them using the specified context, style, and vertex buffer. This method ensures that the queued vertex data is uploaded, the appropriate shader is applied, and the rendering pipeline is executed.
Retrieves a vertex buffer based on the specified size.
Queues a single line of text for rendering at the specified position with the given font and settings.