Font::setHeight() needs to call isSuitableForFont() on the typface, passing the new Font object, and clear the old Typeface if it is not suitable instead of just incrementing the reference count.
This fixes a problem where calling setHeight() on a Font using a hinted face will use the old set of glyphs.
There’s some discussion here:
Looking over the Font code, I think that anywhere dupeInternalIfShared() we might need to also call isSuitableForFont(). This affects many “set” functions.
I don’t fully understand the pimpl used in Font, but this might be as easy as adding this line at the end of each function that calls dupeInternalIfShared:
if (font->typeface && !font->typeface->isSuitableForFont (*this)) font->typeface = nullptr;