5#ifndef FLUTTER_IMPELLER_TYPOGRAPHER_FONT_GLYPH_PAIR_H_
6#define FLUTTER_IMPELLER_TYPOGRAPHER_FONT_GLYPH_PAIR_H_
37 std::optional<StrokeParameters>
stroke;
46#if FML_OS_MACOSX && !FML_OS_IOS
50 Scalar luma =
c.red * 0.2126f +
c.green * 0.7152f +
c.blue * 0.0722f;
130 template <
typename H>
Describes a typeface along with any modifications to its intrinsic properties.
bool IsEqual(const Font &other) const override
std::size_t GetHash() const override
A font along with a glyph in that font rendered at a particular scale and subpixel position.
FontGlyphPair(const ScaledFont &sf, const SubpixelGlyph &g)
The glyph index in the typeface.
Type type
Whether the glyph is a path or a bitmap.
bool operator()(const impeller::GlyphProperties &lhs, const impeller::GlyphProperties &rhs) const
static Tone ComputeTone(const Color &c)
static constexpr ToneOrColor kLightTone
static constexpr ToneOrColor kDarkTone
ToneOrColor tone_or_color
std::optional< StrokeParameters > stroke
std::variant< Tone, Color > ToneOrColor
bool operator()(const impeller::ScaledFont &lhs, const impeller::ScaledFont &rhs) const
A font and a scale. Used as a key that represents a typeface within a glyph atlas.
friend H AbslHashValue(H h, const ScaledFont &sf)
A structure to store all of the parameters related to stroking a path or basic geometry object.
constexpr bool operator()(const impeller::SubpixelGlyph &lhs, const impeller::SubpixelGlyph &rhs) const
A glyph and its subpixel position.
SubpixelGlyph(Glyph p_glyph, SubpixelPosition p_subpixel_offset, GlyphProperties p_properties)
friend H AbslHashValue(H h, const SubpixelGlyph &sg)
SubpixelPosition subpixel_offset
GlyphProperties properties