javascript - Include ttf files in chrome extension content script -
i using content script inject html webpage. trying use google font, cabincondensed-regular, , number of icon fonts gotten icomoon. have downloaded files , including them in css @font-face
, because can tell it's faster, don't know how include them in manifest.json. specify file "content_scripts": [
{ "matches": [ "<all_urls>"], "css":["style.css", "jquery-ui.css"], "js":["jquery-2.1.0.min.js", "index.js", "jquery-ui.min.js"], }
but far can tell there no specific tag fonts, how can include ttf files?
looks can use "web_accessible_resources"
link font files (instead of "content_scripts"
. make sure @font-face
path correct font files. see: https://developer.chrome.com/extensions/manifest/web_accessible_resources
Comments
Post a Comment