Both types are frozen #[pyclass] value objects with #[pyo3(get)] fields, but two instances with identical fields compare by Python identity, not by value:
a, b = font.shape(buf1).glyph_infos[0], font.shape(buf2).glyph_infos[0]
# Same glyph_id/cluster/flags, but a == b is False
This is awkward in tests that want to assert infos == [GlyphInfo(...), ...].
Fix: add eq to the #[pyclass] attrs in src/glyph.rs:12,53 and derive PartialEq, Eq (Eq fine since all fields are Copy + Eq for GlyphInfo; GlyphPosition is i32 fields, also Eq).
Hashability is a separate question — defer until someone asks; equality is a clear win.
Both types are frozen
#[pyclass]value objects with#[pyo3(get)]fields, but two instances with identical fields compare by Python identity, not by value:This is awkward in tests that want to assert infos == [GlyphInfo(...), ...].
Fix: add eq to the #[pyclass] attrs in src/glyph.rs:12,53 and derive PartialEq, Eq (Eq fine since all fields are Copy + Eq for GlyphInfo; GlyphPosition is i32 fields, also Eq).
Hashability is a separate question — defer until someone asks; equality is a clear win.