Describes a typeface along with any modifications to its intrinsic properties. More...
#include <font.h>
Classes | |
struct | Metrics |
Describes the modifications made to the intrinsic properties of a typeface. More... | |
Public Member Functions | |
Font (std::shared_ptr< Typeface > typeface, Metrics metrics) | |
~Font () | |
bool | IsValid () const |
const std::shared_ptr< Typeface > & | GetTypeface () const |
The typeface whose intrinsic properties this font modifies. More... | |
const Metrics & | GetMetrics () const |
std::size_t | GetHash () const override |
bool | IsEqual (const Font &other) const override |
![]() | |
virtual std::size_t | GetHash () const=0 |
Describes a typeface along with any modifications to its intrinsic properties.
|
default |
|
override |
Definition at line 27 of file font.cc.
Referenced by std::hash< impeller::ScaledFont >::operator()().
const Font::Metrics & impeller::Font::GetMetrics | ( | ) | const |
Definition at line 37 of file font.cc.
Referenced by impeller::CanAppendToExistingAtlas(), impeller::TextFrame::CollectUniqueFontGlyphPairs(), impeller::DrawGlyph(), impeller::PairsFitInAtlasOfSize(), and impeller::TextContents::Render().
const std::shared_ptr< Typeface > & impeller::Font::GetTypeface | ( | ) | const |
The typeface whose intrinsic properties this font modifies.
Definition at line 23 of file font.cc.
Referenced by impeller::CanAppendToExistingAtlas(), impeller::DrawGlyph(), and impeller::PairsFitInAtlasOfSize().
|
overridevirtual |
Implements impeller::Comparable< Font >.
Definition at line 32 of file font.cc.
References impeller::DeepComparePointer().
Referenced by std::equal_to< impeller::ScaledFont >::operator()().
bool impeller::Font::IsValid | ( | ) | const |
Definition at line 19 of file font.cc.
Referenced by impeller::TextRun::TextRun().