| Ok(fallbackFont)
when
Skia.Typeface.getUniqueID(fallbackFont.skiaFace)
== Skia.Typeface.getUniqueID(font.skiaFace)
wasn't quite sufficient. It turns out, in the case where a system font is installed that is the same as local font - we could run into a case where we have different unique ids but actually the same font. So in this case - this equality check would be false, because the unique ids are different... but actually, we were getting the same font, so we'd hit the same loop as in #974
Fix: Use Skia.Typeface.equal instead - this works as we expected for that condition
Issue: Having a font installed system-wide, and locally, could cause a hang in our font-fallback code.
Defect: This is actually the same root cause as https://github.com/revery-ui/revery/pull/974 - however, there is a case exposed that we weren't handling.
This logic:
wasn't quite sufficient. It turns out, in the case where a system font is installed that is the same as local font - we could run into a case where we have different unique ids but actually the same font. So in this case - this equality check would be
false
, because the unique ids are different... but actually, we were getting the same font, so we'd hit the same loop as in #974Fix: Use
Skia.Typeface.equal
instead - this works as we expected for that condition