NovaSVG 0.11.5
An SVG library
Loading...
Searching...
No Matches
nova::svg::text_metrics Struct Reference

How big a piece of text is, measured the way a <text> element is laid out. More...

#include <svg.h>

Public Attributes

float width = 0.f
 Advance of the whole text (kerning and ligatures included).
float ascent = 0.f
 Distance from the baseline up to the top of the font's line box; never negative.
float descent = 0.f
 Distance from the baseline down to the bottom of the line box; never negative.
float line_gap = 0.f
 Extra leading the font asks for between two lines.

Detailed Description

How big a piece of text is, measured the way a <text> element is laid out.

All values are in user units (pixels at font_size).

Definition at line 502 of file svg.h.

Member Data Documentation

◆ ascent

float nova::svg::text_metrics::ascent = 0.f

Distance from the baseline up to the top of the font's line box; never negative.

Definition at line 504 of file svg.h.

◆ descent

float nova::svg::text_metrics::descent = 0.f

Distance from the baseline down to the bottom of the line box; never negative.

Definition at line 505 of file svg.h.

◆ line_gap

float nova::svg::text_metrics::line_gap = 0.f

Extra leading the font asks for between two lines.

Definition at line 506 of file svg.h.

◆ width

float nova::svg::text_metrics::width = 0.f

Advance of the whole text (kerning and ligatures included).

Definition at line 503 of file svg.h.


The documentation for this struct was generated from the following file:
  • /home/runner/work/novasvg/novasvg/include/nova/svg/svg.h