Donner SVG Editor & Engine
SVG-native editor and embeddable SVG2 + CSS3 engine in C++20, with GPU (WebGPU) and compact CPU renderers, built for correctness, security, and performance.
Loading...
Searching...
No Matches
TextLayoutParams.h File Reference
#include <optional>
#include "donner/base/Box.h"
#include "donner/base/Length.h"
#include "donner/base/RcString.h"
#include "donner/base/RelativeLengthMetrics.h"
#include "donner/base/SmallVector.h"
#include "donner/svg/core/LengthAdjust.h"
#include "donner/svg/core/TextAnchor.h"
#include "donner/svg/core/WritingMode.h"
Include dependency graph for TextLayoutParams.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  donner::svg::TextLayoutParams
 Layout-only parameters consumed by TextEngine. 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::TextLayoutParams

struct donner::svg::TextLayoutParams

Layout-only parameters consumed by TextEngine.

Baseline alignment (dominant-baseline / alignment-baseline) is resolved per span into donner::svg::components::ComputedTextComponent::TextSpan::alignmentBaseline rather than carried here, since each span may resolve a different baseline.

Class Members
SmallVector< RcString, 1 > fontFamilies
FontMetrics fontMetrics
Lengthd fontSize
double inlineSizePx = 0.0 SVG2 inline-size measure in pixels. When greater than 0 (and the writing mode is horizontal), the text engine wraps glyph runs to this measure, producing multiple stacked lines. 0 means no wrapping area (ordinary single-line SVG text).
See also
https://www.w3.org/TR/SVG2/text.html#InlineSizeProperty
LengthAdjust lengthAdjust = LengthAdjust::Default
double letterSpacingPx = 0.0
TextAnchor textAnchor = TextAnchor::Start
optional< Lengthd > textLength
Box2d viewBox
double wordSpacingPx = 0.0
WritingMode writingMode = WritingMode::HorizontalTb