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

Classes

struct  donner::svg::FontVMetrics
 Font vertical metrics in font design units (unscaled). More...
struct  donner::svg::UnderlineMetrics
 Line decoration positioning metrics in font design units. More...
struct  donner::svg::SubSuperMetrics
 Sub/superscript Y offsets from the OS/2 table, in font design units. More...
class  donner::svg::TextBackend
 Abstract font backend for text rendering operations. More...
struct  donner::svg::TextBackend::BitmapGlyph
 Bitmap glyph data from color fonts (CBDT/CBLC). More...
struct  donner::svg::TextBackend::ShapedGlyph
 A single shaped glyph with advance and cluster info. More...
struct  donner::svg::TextBackend::ShapedRun
 Result of shaping a text range. 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::FontVMetrics

struct donner::svg::FontVMetrics

Font vertical metrics in font design units (unscaled).

Class Members
int ascent = 0 Positive, above baseline.
int descent = 0 Negative, below baseline.
int lineGap = 0

◆ donner::svg::UnderlineMetrics

struct donner::svg::UnderlineMetrics

Line decoration positioning metrics in font design units.

Class Members
double position = 0 Signed offset from baseline in font design units (negative = below).
double thickness = 0 Stroke thickness in font design units.

◆ donner::svg::SubSuperMetrics

struct donner::svg::SubSuperMetrics

Sub/superscript Y offsets from the OS/2 table, in font design units.

Class Members
int subscriptYOffset = 0
int superscriptYOffset = 0

◆ donner::svg::TextBackend::BitmapGlyph

struct donner::svg::TextBackend::BitmapGlyph

Bitmap glyph data from color fonts (CBDT/CBLC).

Collaboration diagram for donner::svg::TextBackend::BitmapGlyph:
[legend]
Class Members
double bearingX = 0 Horizontal offset from glyph origin.
double bearingY = 0 Vertical offset from baseline (positive = up).
int height = 0 Bitmap height in pixels.
vector< uint8_t > rgbaPixels RGBA pixel data (premultiplied alpha).
double scale = 1.0 Scale factor to apply.
int width = 0 Bitmap width in pixels.

◆ donner::svg::TextBackend::ShapedGlyph

struct donner::svg::TextBackend::ShapedGlyph

A single shaped glyph with advance and cluster info.

Class Members
uint32_t cluster = 0 Byte offset into the shaped text range.
float fontSizeScale = 1.0f < 1.0 for synthesized small-caps glyphs.
int glyphIndex = 0 Backend-specific glyph ID.
double xAdvance = 0 Nominal horizontal advance (without kerning).
double xKern = 0 Kerning adjustment to apply before this glyph.
double xOffset = 0 Horizontal offset (GPOS mark positioning; 0 for simple).
double yAdvance = 0 Nominal vertical advance (without kerning).
double yKern = 0 Kerning adjustment (vertical mode).
double yOffset = 0 Vertical offset (GPOS mark positioning; 0 for simple).

◆ donner::svg::TextBackend::ShapedRun

struct donner::svg::TextBackend::ShapedRun

Result of shaping a text range.

Collaboration diagram for donner::svg::TextBackend::ShapedRun:
[legend]
Class Members
vector< ShapedGlyph > glyphs