| 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 113 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 114 of file font_glyph_pair.h.

115 {
116 // Check simple non-optionals first.
117 if (lhs.glyph.index != rhs.glyph.index ||
118 lhs.glyph.type != rhs.glyph.type ||
119 lhs.subpixel_offset != rhs.subpixel_offset ||
120 // Mixmatch properties.
121 lhs.properties.has_value() != rhs.properties.has_value()) {
122 return false;
123 }
124 if (lhs.properties.has_value()) {
125 // Both have properties.
126 return GlyphProperties::Equal{}(lhs.properties.value(),
127 rhs.properties.value());
128 }
129 return true;
130 }
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
impeller::SubpixelGlyph::properties
std::optional< GlyphProperties > properties
Definition: font_glyph_pair.h:93
impeller::SubpixelGlyph::subpixel_offset
SubpixelPosition subpixel_offset
Definition: font_glyph_pair.h:92
impeller::SubpixelGlyph::glyph
Glyph glyph
Definition: font_glyph_pair.h:91

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