MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ line_height()

uint32_t MayaFlux::Portal::Text::GlyphAtlas::line_height ( ) const

Line advance in pixels for this atlas's pixel_size.

Derived from FT_Face metrics: (ascender - descender) in 26.6 fixed-point, shifted right by 6. Returns pixel_size as a safe fallback if the face has not yet been sized (i.e. before the first get_or_rasterize() call).

Definition at line 48 of file GlyphAtlas.cpp.

49{
50 FT_Face face = m_face.get_face();
51 if (!face || face->size == nullptr) {
52 return m_pixel_size;
53 }
54 const int32_t h = (face->size->metrics.ascender - face->size->metrics.descender) >> 6;
55 return h > 0 ? static_cast<uint32_t>(h) : m_pixel_size;
56}
uint32_t h
Definition InkPress.cpp:25
FT_Face get_face() const
Raw FT_Face handle for use by GlyphAtlas.
Definition FontFace.hpp:59

References MayaFlux::Portal::Text::FontFace::get_face(), h, m_face, and m_pixel_size.

Referenced by MayaFlux::Portal::Text::impress(), MayaFlux::Portal::Text::lay_out(), MayaFlux::Portal::Text::press(), and MayaFlux::Portal::Text::repress().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: