| Flutter Impeller |

Public Member Functions | List of all members
impeller::SubpixelGlyph::Equal Struct Reference

`#include <font_glyph_pair.h>`

## Public Member Functions
constexpr bool | operator() (const impeller::SubpixelGlyph &lhs, const impeller::SubpixelGlyph &rhs) const

## Detailed Description

Definition at line 85 of file font_glyph_pair.h.

## Member Function Documentation

## ◆ operator()()

constexpr bool impeller::SubpixelGlyph::Equal::operator() | ( | const impeller::SubpixelGlyph & | lhs,
|  | const impeller::SubpixelGlyph & | rhs
| ) |  | const
| inline constexpr

Definition at line 86 of file font_glyph_pair.h.

87 {
88 // Check simple non-optionals first.
89 if (lhs.glyph.index != rhs.glyph.index ||
90 lhs.glyph.type != rhs.glyph.type ||
91 lhs.subpixel_offset != rhs.subpixel_offset ||
92 // Mixmatch properties.
93 lhs.properties.has_value() != rhs.properties.has_value()) {
94 return false;
95 }
96 if (lhs.properties.has_value()) {
97 // Both have properties.
98 return GlyphProperties::Equal{}(lhs.properties.value(),
99 rhs.properties.value());
100 }
101 return true;
102 }

References impeller::SubpixelGlyph::glyph, impeller::Glyph::index, impeller::SubpixelGlyph::properties, impeller::SubpixelGlyph::subpixel_offset, and impeller::Glyph::type.

The documentation for this struct was generated from the following file:

- impeller/typographer/font_glyph_pair.h

impeller::SubpixelGlyph::subpixel_offset
Point subpixel_offset
Definition: font_glyph_pair.h:62
impeller::SubpixelGlyph::properties
std::optional< GlyphProperties > properties
Definition: font_glyph_pair.h:63
impeller::SubpixelGlyph::glyph
Glyph glyph
Definition: font_glyph_pair.h:61
impeller::Glyph::index
uint16_t index
Definition: glyph.h:22
impeller::Glyph::type
Type type
Whether the glyph is a path or a bitmap.
Definition: glyph.h:27