I’ve been following pretty much all tutorials there are to use a webfont in your chrome extension, but none of them have worked for me, it still continues to be the same ugly font.
I have downloaded this font as zip (https://fonts.google.com/specimen/Raleway?selection.family=Raleway) and saved Raleway-Regular.ttf under
I have also added the file to web_accessible_resources.
In the style.css I have the following code in the top
The path to the file is correct, I’ve checked. Also, I don’t get any errors in the console log.
Now, my extension has a shadow dom, which keeps my extension inside there, I then dynamically add the style.css file and the html. Like this..
// Add stylesheet
var link = document.createElement("link")
link.type = "text/css";
link.rel = "stylesheet";
link.href = chrome.runtime.getURL('style.css');
// Add content to shadow
page = page.replace(/baseuri/g, extensionOrigin);
shadow.innerHTML += page;
All of the styling works, except for the font face