tinyimg 1.1.1
Lightweight image manipulation library for WebAssembly
Loading...
Searching...
No Matches
TinyTextLine Struct Reference

What one line of a run occupies, and where it sits. More...

#include <text.h>

Public Attributes

uint32_t at
uint32_t length
float width
float x
float y
float baseline
uint32_t glyphs
uint32_t missing
uint8_t clipped
uint8_t ellipsized

Detailed Description

What one line of a run occupies, and where it sits.

Reported by tiny_text_lines so a caller can place something beside a line, or measure how much of a string was actually drawn. The coordinates are relative to the run's own origin, so adding the x and y a draw was given puts them in image space.

Member Data Documentation

◆ at

uint32_t TinyTextLine::at

Byte offset of the line's first character in the run.

◆ baseline

float TinyTextLine::baseline

Baseline, measured down from the top of the run.

◆ clipped

uint8_t TinyTextLine::clipped

Non-zero when the box's height stopped this line being drawn.

◆ ellipsized

uint8_t TinyTextLine::ellipsized

Non-zero when this line was cut short and ends in an ellipsis.

◆ glyphs

uint32_t TinyTextLine::glyphs

Codepoints the line holds.

◆ length

uint32_t TinyTextLine::length

Bytes the line holds, without the break that ended it.

◆ missing

uint32_t TinyTextLine::missing

Codepoints the face had no glyph for.

◆ width

float TinyTextLine::width

Advance width of the line in pixels.

◆ x

float TinyTextLine::x

Left edge of the line box once the alignment is applied.

◆ y

float TinyTextLine::y

Top edge of the line box.


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