 |
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>
11 #include "fml/hash_combine.h"
60 Point p_subpixel_offset,
61 std::optional<GlyphProperties> p_properties)
72 return fml::HashCombine(
103 std::unordered_map<ScaledFont,
104 std::unordered_set<SubpixelGlyph,
106 SubpixelGlyph::Equal>,
123 #endif // FLUTTER_IMPELLER_TYPOGRAPHER_FONT_GLYPH_PAIR_H_
std::size_t GetHash() const override
Describes a typeface along with any modifications to its intrinsic properties.
std::unordered_map< ScaledFont, std::unordered_set< SubpixelGlyph, SubpixelGlyph::Hash, SubpixelGlyph::Equal >, ScaledFont::Hash, ScaledFont::Equal > FontGlyphMap
constexpr bool operator()(const impeller::ScaledFont &lhs, const impeller::ScaledFont &rhs) const
constexpr bool operator()(const impeller::SubpixelGlyph &lhs, const impeller::SubpixelGlyph &rhs) const
A glyph and its subpixel position.
std::optional< GlyphProperties > properties
The glyph index in the typeface.
const SubpixelGlyph & glyph
const ScaledFont & scaled_font
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.
constexpr std::size_t operator()(const impeller::ScaledFont &sf) const
constexpr std::size_t operator()(const impeller::SubpixelGlyph &sg) const
SubpixelGlyph(Glyph p_glyph, Point p_subpixel_offset, std::optional< GlyphProperties > p_properties)
FontGlyphPair(const ScaledFont &sf, const SubpixelGlyph &g)
bool IsEqual(const Font &other) const override
static constexpr Color Black()
A font and a scale. Used as a key that represents a typeface within a glyph atlas.