Easy3D 3.0.0
Loading...
Searching...
No Matches
TextOptions Struct Reference

Font and placement options for a laid-out UTF-8 string. More...

#include <text_layout.h>

Public Attributes

std::size_t font = 0
 Index returned by TextLayoutEngine::add_font().
 
float size = 24
 Font size in framebuffer pixels, independent of platform DPI.
 
float x = 0
 Horizontal framebuffer-pixel origin.
 
float y = 0
 
vec4 color = vec4(0, 0, 0, 1)
 Text color in RGBA.
 
TextAlign align = TextAlign::left
 Alignment of shorter lines relative to the longest line.
 
float character_spacing = 0
 Additional horizontal spacing between characters, in framebuffer pixels.
 
float line_spacing = 0
 Additional line spacing as a fraction of font line height; must be at least -1.
 
bool kerning = false
 Apply the font's horizontal kerning pairs when positioning glyphs.
 
bool upper_left = true
 

Detailed Description

Font and placement options for a laid-out UTF-8 string.

Examples
Tutorial_309_TextRendering.

Member Data Documentation

◆ upper_left

bool upper_left = true

If true, y is the first line's top and lines proceed downward; otherwise y is the first line's bottom and lines proceed upward.

Examples
Tutorial_309_TextRendering.

◆ y

float y = 0

Vertical framebuffer-pixel origin.

Examples
Tutorial_309_TextRendering.

The documentation for this struct was generated from the following file: