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

#include <font.h>

Public Member Functions

 FontFace ()=default
 
 FontFace (font_face_t *face)
 
 FontFace (const void *data, size_t length, destroy_func_t destroy_func, void *closure)
 
 FontFace (const char *filename)
 
 FontFace (const FontFace &face)
 
 FontFace (FontFace &&face)
 
 ~FontFace ()
 
FontFace & operator= (const FontFace &face)
 
FontFace & operator= (FontFace &&face)
 
void swap (FontFace &face)
 
bool isNull () const
 
font_face_t * get () const
 
float unitsPerEm () const
 
float ascentUnits () const
 
float descentUnits () const
 
float advanceWidthUnits (char32_t codepoint) const
 
float kernAdvanceUnits (char32_t first, char32_t second) const
 
float notdefAdvanceWidthUnits () const
 
std::vector< char32_t > codepoints () const
 

Detailed Description

Definition at line 22 of file font.h.

Constructor & Destructor Documentation

◆ FontFace() [1/6]

novasvg::FontFace::FontFace ( )
default

Referenced by operator=(), and operator=().

◆ FontFace() [2/6]

NOVASVG_INLINE novasvg::FontFace::FontFace ( font_face_t *  face)
explicit

Definition at line 211 of file font.h.

◆ FontFace() [3/6]

NOVASVG_INLINE novasvg::FontFace::FontFace ( const void *  data,
size_t  length,
destroy_func_t  destroy_func,
void *  closure 
)

Definition at line 216 of file font.h.

◆ FontFace() [4/6]

NOVASVG_INLINE novasvg::FontFace::FontFace ( const char *  filename)

Definition at line 221 of file font.h.

◆ FontFace() [5/6]

NOVASVG_INLINE novasvg::FontFace::FontFace ( const FontFace &  face)

Definition at line 226 of file font.h.

◆ FontFace() [6/6]

NOVASVG_INLINE novasvg::FontFace::FontFace ( FontFace &&  face)

Definition at line 231 of file font.h.

◆ ~FontFace()

NOVASVG_INLINE novasvg::FontFace::~FontFace ( )

Definition at line 236 of file font.h.

References novasvg::render::font_face_destroy().

Member Function Documentation

◆ advanceWidthUnits()

NOVASVG_INLINE float novasvg::FontFace::advanceWidthUnits ( char32_t  codepoint) const

Definition at line 288 of file font.h.

References novasvg::render::font_face_get_glyph_metrics(), isNull(), and unitsPerEm().

Referenced by notdefAdvanceWidthUnits().

◆ ascentUnits()

NOVASVG_INLINE float novasvg::FontFace::ascentUnits ( ) const

Definition at line 270 of file font.h.

References novasvg::render::font_face_get_metrics(), isNull(), and unitsPerEm().

◆ codepoints()

NOVASVG_INLINE std::vector< char32_t > novasvg::FontFace::codepoints ( ) const

Definition at line 311 of file font.h.

References novasvg::render::font_face_enumerate_codepoints(), and isNull().

◆ descentUnits()

NOVASVG_INLINE float novasvg::FontFace::descentUnits ( ) const

Definition at line 279 of file font.h.

References novasvg::render::font_face_get_metrics(), isNull(), and unitsPerEm().

◆ get()

◆ isNull()

◆ kernAdvanceUnits()

NOVASVG_INLINE float novasvg::FontFace::kernAdvanceUnits ( char32_t  first,
char32_t  second 
) const

Definition at line 301 of file font.h.

References novasvg::render::font_face_get_kern_advance(), isNull(), and unitsPerEm().

◆ notdefAdvanceWidthUnits()

float novasvg::FontFace::notdefAdvanceWidthUnits ( ) const
inline

Definition at line 80 of file font.h.

References advanceWidthUnits().

◆ operator=() [1/2]

NOVASVG_INLINE FontFace & novasvg::FontFace::operator= ( const FontFace &  face)

Definition at line 241 of file font.h.

References FontFace(), and swap().

◆ operator=() [2/2]

NOVASVG_INLINE FontFace & novasvg::FontFace::operator= ( FontFace &&  face)

Definition at line 247 of file font.h.

References FontFace(), and swap().

◆ swap()

NOVASVG_INLINE void novasvg::FontFace::swap ( FontFace &  face)

Definition at line 253 of file font.h.

Referenced by operator=(), and operator=().

◆ unitsPerEm()

NOVASVG_INLINE float novasvg::FontFace::unitsPerEm ( ) const

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