Display SWkeys TTF font in XML Author
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 36
- Joined: Tue Feb 21, 2012 8:22 pm
- Location: Rotterdam, the Netherlands
- Contact:
Display SWkeys TTF font in XML Author
I modified the css_classed to change the font of uicontrol in the user interface to use font SWkeys. However the XML author editor only shows squares. Apparently the editor has trouble with the glyphs in Swkeys. Why?
This is my css_classed modification:
No problems in FOP/PDF output. There I see SWkey glyphs!
This is inconvenient because now it is very hard to spot mistakes in the editor...
I am doing it wrong, or is it an editor problem?
This is my css_classed modification:
Code: Select all
*[class~="ui-d/menucascade"] > *[class~="ui-d/uicontrol"]{
display: inline;
font-weight: bold;
font-family: Sans;
}
*[class~="ui-d/uicontrol"]{
display: inline;
font-family: SWkeys;
This is inconvenient because now it is very hard to spot mistakes in the editor...
I am doing it wrong, or is it an editor problem?
Kind Regards,
Reinier Kleipool,
Course Materials editor,
Open Source Academy
http://www.OpenSourceAcademy.eu
Reinier Kleipool,
Course Materials editor,
Open Source Academy
http://www.OpenSourceAcademy.eu
-
- Posts: 9448
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Display SWkeys TTF font in XML Author
Hi,
Oxygen is a Java application and in order for Oxygen to support certain fonts for visual editing the fonts need to be properly installed in the operating system (on Windows this means copying the fonts to the Fonts directory).
I will consider that you have already done this.
The SWKeys font family can only render a very limited range of characters starting about from decimal 61473 to decimal 61695.
You can go to the Edit menu and choose Insert from character map, then change the font family to SWkeys and see exactly the characters which can be rendered with the font.
But the trick is that some fonts can specify that its glyph range can be mapped to multiple character ranges.
So probably this particular font specifies that the usual character '1' should be rendered as if it were the character f031.
Oxygen does not have custom code to draw the characters in one way or the other so it relies explicitly on the Java VM to translate characters to their visual representation.
On the other side Apache FOP has its own implementation which reads and interprets True Type font files.
So this is the reason for the difference in behavior, probably the Java VM does not properly support such mappings on certain fonts.
Sorry but the only workaround I can suggest would be to use the default font family for rendering *[class~="ui-d/uicontrol"] in the Author page. Maybe you can add a :before or after static content to it to remind technical writers that it will be rendered differently.
Regards,
Radu
Oxygen is a Java application and in order for Oxygen to support certain fonts for visual editing the fonts need to be properly installed in the operating system (on Windows this means copying the fonts to the Fonts directory).
I will consider that you have already done this.
The SWKeys font family can only render a very limited range of characters starting about from decimal 61473 to decimal 61695.
You can go to the Edit menu and choose Insert from character map, then change the font family to SWkeys and see exactly the characters which can be rendered with the font.
But the trick is that some fonts can specify that its glyph range can be mapped to multiple character ranges.
So probably this particular font specifies that the usual character '1' should be rendered as if it were the character f031.
Oxygen does not have custom code to draw the characters in one way or the other so it relies explicitly on the Java VM to translate characters to their visual representation.
On the other side Apache FOP has its own implementation which reads and interprets True Type font files.
So this is the reason for the difference in behavior, probably the Java VM does not properly support such mappings on certain fonts.
Sorry but the only workaround I can suggest would be to use the default font family for rendering *[class~="ui-d/uicontrol"] in the Author page. Maybe you can add a :before or after static content to it to remind technical writers that it will be rendered differently.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 36
- Joined: Tue Feb 21, 2012 8:22 pm
- Location: Rotterdam, the Netherlands
- Contact:
Re: Display SWkeys TTF font in XML Author
I think the problem is with the fact that the SWKeys font in encoded in ISO-8859-1, not unicode. I downloaded free font KCaps from http://www.searchfreefonts.com/download ... x?d=207934 and this is Unicode. When I use this, the GUI does show key-cap glyphs.
Kind Regards,
Reinier Kleipool,
Course Materials editor,
Open Source Academy
http://www.OpenSourceAcademy.eu
Reinier Kleipool,
Course Materials editor,
Open Source Academy
http://www.OpenSourceAcademy.eu
-
- Posts: 9448
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Display SWkeys TTF font in XML Author
Hi,
Thanks for posting the workaround. I have no idea why one works and the other doesn't in the Java VM, it would probably take a lot of digging to find out.
Regards,
Radu
Thanks for posting the workaround. I have no idea why one works and the other doesn't in the Java VM, it would probably take a lot of digging to find out.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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