 |
Flutter Impeller
|
|
Go to the documentation of this file.
5 #ifndef FLUTTER_IMPELLER_TYPOGRAPHER_FONT_GLYPH_PAIR_H_
6 #define FLUTTER_IMPELLER_TYPOGRAPHER_FONT_GLYPH_PAIR_H_
8 #include <unordered_map>
9 #include <unordered_set>
46 Point p_subpixel_offset,
54 std::unordered_map<ScaledFont, std::unordered_set<SubpixelGlyph>>;
87 return fml::HashCombine(
96 struct std::equal_to<
impeller::SubpixelGlyph> {
111 #endif // FLUTTER_IMPELLER_TYPOGRAPHER_FONT_GLYPH_PAIR_H_
std::size_t GetHash() const override
constexpr std::size_t operator()(const impeller::ScaledFont &sf) const
Describes a typeface along with any modifications to its intrinsic properties.
constexpr bool operator()(const impeller::SubpixelGlyph &lhs, const impeller::SubpixelGlyph &rhs) const
A glyph and its subpixel position.
constexpr uint32_t ToARGB() const
Convert to ARGB 32 bit color.
SubpixelGlyph(Glyph p_glyph, Point p_subpixel_offset, GlyphProperties p_properties)
The glyph index in the typeface.
const SubpixelGlyph & glyph
const ScaledFont & scaled_font
std::unordered_map< ScaledFont, std::unordered_set< SubpixelGlyph > > FontGlyphMap
GlyphProperties properties
A font along with a glyph in that font rendered at a particular scale and subpixel position.
Type type
Whether the glyph is a path or a bitmap.
FontGlyphPair(const ScaledFont &sf, const SubpixelGlyph &g)
bool IsEqual(const Font &other) const override
static constexpr Color Black()
constexpr bool operator()(const impeller::ScaledFont &lhs, const impeller::ScaledFont &rhs) const
constexpr std::size_t operator()(const impeller::SubpixelGlyph &sg) const
A font and a scale. Used as a key that represents a typeface within a glyph atlas.