Maya Ivanova
unread,Nov 2, 2022, 5:01:54 PM11/2/22Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Chromium Extensions, stefa...@gmail.com, decklin...@gmail.com, Chromium Extensions, Maya Ivanova
Hey! Thanks for the help.
I have a solution. Writing it up here in case anyone needs it:
- font-face src should be using the extension's id
@font-face {
font-family: 'Name';
font-style: normal;
font-weight: 400;
src: url('chrome-extension://ID/fonts/Name.woff') format('woff');
}
- use chrome.runtime.getURL(url) to get the full url (Given a relative path to a resource packaged with the extension, return a fully-qualified URL).
- function that attaches style with the font face using the full url
- adding to manifest.json "web_accessible_resources": [{"resources": ["/static/fonts/*.ttf"], "matches": ["<all_urls>"]}]
Thanks,
Maya