That's the right solution. But it won't work for other browsers because unlike Safari, Chrome of Firefox might be used on tens of different OSes and there is no need for marketing companies to know what OS are you using.
Firefox has about:config prefs to block web content from using fonts other than their OS's default system fonts.
The pref names and their possible values:
# Visibility level of font families available to CSS font-matching:
# 1 - only base system fonts
# 2 - also fonts from optional language packs
# 3 - also user-installed fonts
layout.css.font-visibility.standard
layout.css.font-visibility.trackingprotection
layout.css.font-visibility.resistFingerprinting
Thank you for the link. I actually was wondering if there is a list of about:config properties and it seems that most of them are described in that YAML file.