Okay, so it works locally (or in a dev) environment because you don’t have to use register_asset to get to it. The issue you are going to have is register_asset doesn’t accept font files.
So the best solution I can give you, is one of the following
- Upload the fonts to a CDN, reference the CDN in the CSS (applies for all scenarios).
- Upload the fonts to the root of your main site and in the CSS use /fonts/overwatch-heroes…
- Inform people in the README to do the same so it works for them too (doesn’t really apply for those running on a sub-domain though)
- Instruct users to change the Site Setting
authorized extensionsto be able to upload the fonts, then copy and paste CSS into the Admin > Customize area to reference those uploaded URLs for the @font-face (and in your plugin CSS, do not have that @font-face portion in it)
- This is probably the most convoluted way
So without getting the fonts to a location where they can be served, you won’t be able to reference them ![]()