system-ui does not work correctly on macOS
This is somewhat related to https://bugzilla.gnome.org/show_bug.cgi?id=766148 And follows from an upstream discussion here: https://github.com/fontforge/fontforge/pull/4704#issuecomment-965114369
system-ui
on recent versions of macOS should map to SF Pro. I have found that on at least macOS Catalina, there are variants of this font that have a CT weight outside the purported bounds defined in pango (namely -0.8):
This is causing the thinnest weighted variant to be chosen as the 'normal' weight due to this:
Which leads to the wrong weight being selected for PANGO_WEIGHT_NORMAL.
It seems simple enough to change that line to set values below/above the minimum/maximum bound to PANGO_WEIGHT_THIN / PANGO_WEIGHT_HEAVY respectively, but I'm not entirely sure if there should be more to this than that. It at least fixes the issue that I was seeing though.
Any thoughts? Otherwise I can just submit that patch as described.