[Docs] What is the correct way to include fonts?
See original GitHub issueRegardless of whether I use the resource-inliner or just a style tag, all font declarations get removed.
Since all my css comes from files, I tried only having the fonts in a style tag in the html file, but this seemed to be removed unless I set removeStyleTags
to false, which of course meant all other styles that has been imported from files also remained in the head in a style tag.
What is the correct way to do this?
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:9
Top Results From Across the Web
How to Install Custom Fonts for Google Docs - Alphr
Open the extracted font folder, then right-click one of the Google font files and select the Install option on the context menu. To...
Read more >How to Add Fonts To Google Docs - groovyPost
First, you can locate available fonts in the toolbar at the top of your document. · To change it, click the downward arrow...
Read more >How to Add a Font to Google Docs in 2 Different Ways
1. Go to docs.new and start or open your document. · 2. Click "More Fonts" in the top toolbar — this will prompt...
Read more >How to add fonts to Google Docs - Android Police
Add fonts to Google Docs · Visit Google Docs on the web and sign in with your Google account details. · Select the...
Read more >How to add more fonts to Google Docs (and why you ... - ZDNET
3. Adding new fonts ... Click the Font drop-down (Figure 1) from within your new document from within the standard toolbar. The Google...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you don’t want to inline a
<link>
you can add the attributedata-inline-ignore
like<link href="..." data-inline-ignore >
. This is documented here https://www.npmjs.com/package/web-resource-inlinerThe issue with Google fonts is sort of complicated by the fact that it returns different CSS depending on the user-agent that makes the request.
I totally get what you are saying though, @font-face is another thing like @media that can’t be inlined. More generally, we probably need to add proper support for all CSS at-rules as listed on https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule - adding support for @media is only a special case of that support.
#158 resolved this issue