|
NovaSVG 0.10.0
A header-only SVG library
|
#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 |
|
default |
| NOVASVG_INLINE novasvg::Font::Font | ( | const FontFace & | face, |
| float | size | ||
| ) |
Definition at line 455 of file font.h.
References novasvg::render::font_face_get_metrics(), novasvg::FontFace::get(), and novasvg::FontFace::isNull().
|
inline |
Definition at line 145 of file font.h.
Referenced by novasvg::calculateBaselineOffset().
|
inline |
Definition at line 171 of file font.h.
Referenced by glyphBoxes().
| NOVASVG_INLINE std::vector< Font::GlyphBox > novasvg::Font::glyphBoxes | ( | const std::u32string_view & | text | ) | const |
Definition at line 477 of file font.h.
References face(), novasvg::render::font_face_apply_ligature(), novasvg::render::font_face_get_glyph_metrics(), novasvg::render::font_face_get_kern_advance(), novasvg::FontFace::get(), novasvg::render::rect::h, novasvg::FontFace::isNull(), novasvg::render::NOVASVG_TEXT_ENCODING_UTF32, text, novasvg::render::text_iterator_has_next(), novasvg::render::text_iterator_init(), novasvg::render::text_iterator_next(), novasvg::render::rect::w, novasvg::render::rect::x, and novasvg::render::rect::y.
|
inline |
Definition at line 174 of file font.h.
References novasvg::FontFace::isNull().
| NOVASVG_INLINE float novasvg::Font::measureText | ( | const std::u32string_view & | text | ) | const |
Definition at line 471 of file font.h.
References novasvg::render::font_face_text_extents(), novasvg::FontFace::get(), novasvg::FontFace::isNull(), novasvg::render::NOVASVG_TEXT_ENCODING_UTF32, and text.
|
inline |
Definition at line 172 of file font.h.
Referenced by novasvg::SVGForeignObjectElement::fontsFor().
| NOVASVG_INLINE float novasvg::Font::xHeight | ( | ) | const |
Definition at line 463 of file font.h.
References novasvg::render::font_face_get_glyph_metrics(), novasvg::FontFace::get(), novasvg::render::rect::h, and novasvg::FontFace::isNull().