 |
Flutter Impeller
|
|
Go to the documentation of this file.
5 #ifndef FLUTTER_IMPELLER_TYPOGRAPHER_FONT_H_
6 #define FLUTTER_IMPELLER_TYPOGRAPHER_FONT_H_
10 #include "fml/hash_combine.h"
59 Font(std::shared_ptr<Typeface> typeface,
72 const std::shared_ptr<Typeface>&
GetTypeface()
const;
77 std::size_t
GetHash()
const override;
85 std::shared_ptr<Typeface> typeface_;
86 Metrics metrics_ = {};
88 bool is_valid_ =
false;
100 #endif // FLUTTER_IMPELLER_TYPOGRAPHER_FONT_H_
std::size_t GetHash() const override
Describes a typeface along with any modifications to its intrinsic properties.
const std::shared_ptr< Typeface > & GetTypeface() const
The typeface whose intrinsic properties this font modifies.
constexpr bool operator==(const Metrics &o) const
Font(std::shared_ptr< Typeface > typeface, Metrics metrics, AxisAlignment axis_alignment)
AxisAlignment
Determines the axis along which there is subpixel positioning.
const Metrics & GetMetrics() const
bool IsEqual(const Font &other) const override
constexpr std::size_t operator()(const impeller::Font::Metrics &m) const
Describes the modifications made to the intrinsic properties of a typeface.
AxisAlignment GetAxisAlignment() const