https://andreubotella.com/csswg-auto-build/css-font-loading-3/#font-face-source
It is annoying that if you want to write code that works in both a window or worker context, you have to do (self.fonts || document.fonts).load(...).
It would be better if you could do fonts.load(...).
I propose that window.fonts be added as an alias for document.fonts, and all the examples be updated to steer people toward fonts instead of document.fonts.