Font:getVertices
EditReturns a table of vertices for a piece of text, along with a Material to use when rendering it. The Material returned by this function may not be the same if the Font's texture atlas needs to be recreated with a bigger size to make room for more glyphs.
vertices, material = Font:getVertices(halign, valign)
Arguments
Name | Type | Description |
halign | HorizontalAlign | The horizontal align. |
valign | VerticalAlign | The vertical align. |
Returns
Name | Type | Description |
vertices | table | The table of vertices. See below for the format of each vertex. |
material | Material | A Material to use when rendering the vertices. |
Notes
Each vertex is a table of 4 floating point numbers with the following data:
{ x, y, u, v }
These could be placed in a vertex buffer using the following buffer format:
{ 'vec2:VertexPosition', 'vec2:VertexUV' }