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

#include <font.h>

Classes

struct  GlyphBox
 

Public Member Functions

 Font ()=default
 
 Font (const FontFace &face, float size)
 
float ascent () const
 
float descent () const
 
float height () const
 
float lineGap () const
 
float xHeight () const
 
float measureText (const std::u32string_view &text) const
 
std::vector< GlyphBox > glyphBoxes (const std::u32string_view &text) const
 
const FontFace & face () const
 
float size () const
 
bool isNull () const
 

Detailed Description

Definition at line 140 of file font.h.

Constructor & Destructor Documentation

◆ Font() [1/2]

novasvg::Font::Font ( )
default

◆ Font() [2/2]

NOVASVG_INLINE novasvg::Font::Font ( const FontFace &  face,
float  size 
)

Member Function Documentation

◆ ascent()

float novasvg::Font::ascent ( ) const
inline

Definition at line 145 of file font.h.

Referenced by novasvg::calculateBaselineOffset().

◆ descent()

float novasvg::Font::descent ( ) const
inline

Definition at line 146 of file font.h.

◆ face()

const FontFace & novasvg::Font::face ( ) const
inline

Definition at line 171 of file font.h.

Referenced by glyphBoxes().

◆ glyphBoxes()

◆ height()

float novasvg::Font::height ( ) const
inline

Definition at line 147 of file font.h.

◆ isNull()

bool novasvg::Font::isNull ( ) const
inline

Definition at line 174 of file font.h.

References novasvg::FontFace::isNull().

◆ lineGap()

float novasvg::Font::lineGap ( ) const
inline

Definition at line 148 of file font.h.

◆ measureText()

NOVASVG_INLINE float novasvg::Font::measureText ( const std::u32string_view &  text) const

◆ size()

float novasvg::Font::size ( ) const
inline

Definition at line 172 of file font.h.

Referenced by novasvg::SVGForeignObjectElement::fontsFor().

◆ xHeight()


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