#include <typeface_stb.h>
Definition at line 15 of file typeface_stb.h.
◆ TypefaceSTB()
impeller::TypefaceSTB::TypefaceSTB |
( |
std::unique_ptr< fml::Mapping > |
typeface_mapping | ) |
|
|
explicit |
Definition at line 14 of file typeface_stb.cc.
15 : typeface_mapping_(std::move(typeface_mapping)),
16 font_info_(std::make_unique<stbtt_fontinfo>()) {
17
18 auto offset = stbtt_GetFontOffsetForIndex(typeface_mapping_->GetMapping(), 0);
19 if (stbtt_InitFont(font_info_.get(), typeface_mapping_->GetMapping(),
21 FML_LOG(
ERROR) <<
"Failed to initialize stb font from binary data.";
22 } else {
23 is_valid_ = true;
24 }
25}
#define FML_LOG(severity)
◆ ~TypefaceSTB()
impeller::TypefaceSTB::~TypefaceSTB |
( |
| ) |
|
|
overridedefault |
◆ GetFontInfo()
const stbtt_fontinfo * impeller::TypefaceSTB::GetFontInfo |
( |
| ) |
const |
◆ GetHash()
std::size_t impeller::TypefaceSTB::GetHash |
( |
| ) |
const |
|
overridevirtual |
◆ GetTypefaceFile()
const uint8_t * impeller::TypefaceSTB::GetTypefaceFile |
( |
| ) |
const |
Definition at line 45 of file typeface_stb.cc.
45 {
46 return typeface_mapping_->GetMapping();
47}
◆ IsEqual()
bool impeller::TypefaceSTB::IsEqual |
( |
const Typeface & |
other | ) |
const |
|
overridevirtual |
◆ IsValid()
bool impeller::TypefaceSTB::IsValid |
( |
| ) |
const |
|
overridevirtual |
◆ kPointsToPixels
constexpr float impeller::TypefaceSTB::kPointsToPixels = 96.0 / 72.0 |
|
staticconstexpr |
The documentation for this class was generated from the following files: