Donner SVG 0.8.0
0.8.0 ยท ebf353960.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
TextTypes.h File Reference
#include <optional>
#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::ResolvedTextFont
 Resolved face and used font size for layout or declaring-element decoration metrics. More...
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::ResolvedTextFont

struct donner::svg::ResolvedTextFont

Resolved face and used font size for layout or declaring-element decoration metrics.

Class Members
FontHandle font
float usedSizePx = 0.0f

◆ donner::svg::TextGlyph

struct donner::svg::TextGlyph

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

Produced by the text engine for simple and full shaping backends.

Class Members
uint32_t cluster = 0 Byte offset into the span text for the glyph's source cluster. Byte offset of the SVG positioning group; absent uses the 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).
optional< uint32_t > positioningCluster
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.

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.
bool textLengthAppliedOnPath True when path placement consumed this run's textLength.
float usedFontSizePx = 0.0f Font size used for shaping, including font-size-adjust.