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

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

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