Donner 0.5.0
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
TextTypes.h File Reference
#include <vector>
#include "donner/svg/resources/FontManager.h"
Include dependency graph for TextTypes.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  donner::svg::TextGlyph
 A single positioned glyph in a laid-out text run. More...
struct  donner::svg::TextRun
 A run of positioned glyphs sharing the same font. More...

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.
namespace  donner::svg
 Donner SVG library, which can load, manipulate and render SVG files.

Class Documentation

◆ donner::svg::TextGlyph

struct donner::svg::TextGlyph

A single positioned glyph in a laid-out text run.

Produced by both TextLayout (simple backend) and TextShaper (full backend).

Class Members
uint32_t cluster = 0 Byte offset into the span text for the glyph's source cluster.
float fontSizeScale = 1.0f Per-glyph font size multiplier (< 1.0 for small-caps).
int glyphIndex = 0 Glyph index (backend-specific: stbtt or HarfBuzz).
double rotateDegrees = 0 Per-glyph rotation in degrees.
float stretchScaleX = 1.0f Additional X-axis glyph stretch from lengthAdjust.
float stretchScaleY = 1.0f Additional Y-axis glyph stretch from lengthAdjust.
double xAdvance = 0 Horizontal advance to next glyph.
double xKern = 0 Kerning adjustment applied before this glyph (for path layout).
double xPosition = 0 Absolute X position for this glyph.
double yAdvance = 0 Vertical advance (used in vertical writing modes).
double yPosition = 0 Absolute Y baseline position.

◆ donner::svg::TextRun

struct donner::svg::TextRun

A run of positioned glyphs sharing the same font.

Collaboration diagram for donner::svg::TextRun:
[legend]
Class Members
FontHandle font Font handle for this run.
vector< TextGlyph > glyphs Positioned glyphs.
bool onPath = false True if glyphs are positioned along a textPath.