#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>()),
19 auto offset = stbtt_GetFontOffsetForIndex(typeface_mapping_->GetMapping(), 0);
20 if (stbtt_InitFont(font_info_.get(), typeface_mapping_->GetMapping(),
22 FML_LOG(ERROR) <<
"Failed to initialize stb font from binary data.";
◆ ~TypefaceSTB()
| impeller::TypefaceSTB::~TypefaceSTB |
( |
| ) |
|
|
overridedefault |
◆ GetFontInfo()
| const stbtt_fontinfo * impeller::TypefaceSTB::GetFontInfo |
( |
| ) |
const |
◆ GetHash()
| std::size_t impeller::TypefaceSTB::GetHash |
( |
| ) |
const |
|
override |
◆ GetTypefaceFile()
| const uint8_t * impeller::TypefaceSTB::GetTypefaceFile |
( |
| ) |
const |
Definition at line 46 of file typeface_stb.cc.
47 return typeface_mapping_->GetMapping();
◆ 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: