Use Nearest Available Font Weight Instead of "Unavailable" Error
When switching fonts, instead of generating an "unavailable font" error when a font weight doesn't exist, automatically use the closest available weight based on the previous setting.
For example, when switching from a font that has Black to a font that only has Bold or Regular, simply use the closest available weight e.g. Bold, rather than generating the "unavailable" error.
-
Keith Hartman
commented
This could be done by tracking the numeric weight (which is standardized) instead of the label of the weight (which is not standardized). CSS already does this. For example, Regular/Book is 400. If you switch to a font that uses the label Normal for that weight, it would just use that since its weight is also 400.