Webhelp Fonts for different languages
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 55
- Joined: Tue Mar 13, 2018 6:07 pm
Webhelp Fonts for different languages
Post by steinbacherGE »
When publishing translated bookmaps to Webhelp, what is the best way to deliver different fonts for different languages? Is there a way to specify a font in the CSS based on the xml:lang attribute? Do these fonts need to be embedded with the webhelp package, or can we reference a Google font like Noto?
https://www.google.com/get/noto/
Thanks,
Leroy Steinbacher
https://www.google.com/get/noto/
Thanks,
Leroy Steinbacher
-
- Site Admin
- Posts: 275
- Joined: Thu Dec 24, 2009 11:21 am
Re: Webhelp Fonts for different languages
Hello,
There is no requirement to embed the fonts in the WebHelp output. You can reference Google Fonts in you CSS files. We have several built-in Publishing Templates that also use Google Fonts (Aquamarine, Ashes, Blue, etc).
If your HTML pages contain the language information as an xml:lang attribute you can specify a different font depending on the current language as follows:
Regards,
Alin
There is no requirement to embed the fonts in the WebHelp output. You can reference Google Fonts in you CSS files. We have several built-in Publishing Templates that also use Google Fonts (Aquamarine, Ashes, Blue, etc).
If your HTML pages contain the language information as an xml:lang attribute you can specify a different font depending on the current language as follows:
Code: Select all
@import url('https://fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap');
html[xml\:lang^="de"] body {
font-family: Lato, sans-serif;
}
html[xml\:lang^="fr"] body {
font-family: 'Noto Sans', sans-serif;
}
Alin
Alin Balasa
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
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