NovaSVG 0.10.0
A header-only SVG library
Loading...
Searching...
No Matches
novasvg::ForeignObjectFonts Struct Reference

The faces a <foreignObject> can paint with: its own font plus the bold / italic variants of it that , , , and inline font-weight / font-style ask for. More...

#include <svgelement.h>

Collaboration diagram for novasvg::ForeignObjectFonts:

Public Member Functions

const Font & get (unsigned char style) const
 

Public Attributes

Font face [4]
 

Static Public Attributes

static constexpr unsigned char Bold = 1
 
static constexpr unsigned char Italic = 2
 

Detailed Description

The faces a <foreignObject> can paint with: its own font plus the bold / italic variants of it that , , , and inline font-weight / font-style ask for.

Indexed by style bits (bit 0 = bold, bit 1 = italic), so get(Bold | Italic) is the bold italic face. Variants nothing asked for may stay null. Each one is looked up exactly like SVG <text> looks up its font for the same weight/style, so the result is whatever faces the machine (or an @font-face) provides – there is no synthetic emboldening or slanting: with no bold face installed, bold text simply renders in the regular face, as it does for <text>.

Definition at line 1171 of file svgelement.h.

Member Function Documentation

◆ get()

const Font & novasvg::ForeignObjectFonts::get ( unsigned char  style) const
inline

Definition at line 1176 of file svgelement.h.

References style.

Referenced by novasvg::measureForeignObjectSegments().

Member Data Documentation

◆ Bold

constexpr unsigned char novasvg::ForeignObjectFonts::Bold = 1
staticconstexpr

◆ face

Font novasvg::ForeignObjectFonts::face[4]

Definition at line 1175 of file svgelement.h.

Referenced by novasvg::measureForeignObjectContent().

◆ Italic

constexpr unsigned char novasvg::ForeignObjectFonts::Italic = 2
staticconstexpr

The documentation for this struct was generated from the following file: