FastLED 3.9.15
Loading...
Searching...
No Matches

◆ getGlyphMetrics()

GlyphMetrics fl::FontImpl::getGlyphMetrics ( i32 codepoint) const
inlineoverridevirtual

Implements fl::Font.

Definition at line 59 of file truetype.cpp.hpp.

59 {
60 GlyphMetrics metrics = {};
61 if (!mValid) return metrics;
62
64 &mFontInfo, codepoint,
65 &metrics.advanceWidth,
66 &metrics.leftSideBearing
67 );
68
70 &mFontInfo, codepoint,
71 &metrics.x0, &metrics.y0,
72 &metrics.x1, &metrics.y1
73 );
74 metrics.isEmpty = (result == 0);
75
76 return metrics;
77 }
third_party::truetype::stbtt_fontinfo mFontInfo
void stbtt_GetCodepointHMetrics(const stbtt_fontinfo *info, int32_t codepoint, int32_t *advanceWidth, int32_t *leftSideBearing) FL_NOEXCEPT
int32_t stbtt_GetCodepointBox(const stbtt_fontinfo *info, int32_t codepoint, int32_t *x0, int32_t *y0, int32_t *x1, int32_t *y1) FL_NOEXCEPT
expected< T, E > result
Alias for expected (Rust-style naming)
Definition result.h:31

References fl::GlyphMetrics::advanceWidth, fl::GlyphMetrics::isEmpty, fl::GlyphMetrics::leftSideBearing, mFontInfo, mValid, fl::third_party::truetype::stbtt_GetCodepointBox(), fl::third_party::truetype::stbtt_GetCodepointHMetrics(), fl::GlyphMetrics::x0, fl::GlyphMetrics::x1, fl::GlyphMetrics::y0, and fl::GlyphMetrics::y1.

+ Here is the call graph for this function: