CSS HTML5 PDF - can't import google font
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 167
- Joined: Tue Mar 06, 2018 1:34 am
CSS HTML5 PDF - can't import google font
According to this site on fonts,
https://www.oxygenxml.com/doc/versions/ ... asic_fonts
I should be able to put
@import url('https://fonts.googleapis.com/css?family ... 0,500,700i');
at the top of my css file. However, doing this causes my entire CSS file to be ignored...none of the rules apply. When I remove the import statement, then everything works normally.
Am I missing something? Feels like this should be simple.
https://www.oxygenxml.com/doc/versions/ ... asic_fonts
I should be able to put
@import url('https://fonts.googleapis.com/css?family ... 0,500,700i');
at the top of my css file. However, doing this causes my entire CSS file to be ignored...none of the rules apply. When I remove the import statement, then everything works normally.
Am I missing something? Feels like this should be simple.
-
- Posts: 846
- Joined: Mon Dec 05, 2011 6:04 pm
Re: CSS HTML5 PDF - can't import google font
Hello,
When using remote fonts (like the Google fonts from https://fonts.googleapis.com), in case there is any connectivity issue (you have an incorrect proxy configuration in oXygen or system, any other incorrect network settings configuration in oXygen, or if the server that oXygen tries to reach is down), such issues may occur.
When the connection fails, it breaks further parsing of the document, hence the styles are no longer applied.
As a workaround, you should:
- remove the font import at the top of the CSS file
- if you specifically need that font from Google, just download it locally (Montserat font is available at https://fonts.google.com/specimen/Montserrat - select this font > Download), save it in the same folder with the CSS and define a font-face for it (https://www.oxygenxml.com/doc/versions/ ... aid-title6)
Regards,
Costin
When using remote fonts (like the Google fonts from https://fonts.googleapis.com), in case there is any connectivity issue (you have an incorrect proxy configuration in oXygen or system, any other incorrect network settings configuration in oXygen, or if the server that oXygen tries to reach is down), such issues may occur.
When the connection fails, it breaks further parsing of the document, hence the styles are no longer applied.
As a workaround, you should:
- remove the font import at the top of the CSS file
- if you specifically need that font from Google, just download it locally (Montserat font is available at https://fonts.google.com/specimen/Montserrat - select this font > Download), save it in the same folder with the CSS and define a font-face for it (https://www.oxygenxml.com/doc/versions/ ... aid-title6)
Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service