Cannot render the ⌥ symbol

Having trouble installing Oxygen PDF Chemistry? Got a bug to report? Post it all here.
bloodnok
Posts: 54
Joined: Mon Jun 27, 2011 10:51 pm

Cannot render the ⌥ symbol

Post by bloodnok »

When I generate a PDF from HTML that contains the "⌥" symbol, Chemistry is rendering the result as "#". The source HTML file has the following:

Code: Select all

<span class="ph uicontrol">&#8997; option</span> key
Chemistry is failing to convert that Unicode correctly. Any suggested workarounds?
Costin
Posts: 833
Joined: Mon Dec 05, 2011 6:04 pm

Re: Cannot render the ⌥ symbol

Post by Costin »

Hello,

What Chemistry version are you using?

I just tested with both the DITA Map PDF - based on HTML5 & CSS scenario from oXygen XML Editor v21 and from command line, using the latest chemistry engine available on our website (v21) and the

Code: Select all

<span class="ph uicontrol">&#8997; option</span> key
line rendered the "⌥" symbol without problems.
This seems related to missing fonts from your own system.

In your PDF reader application, you should check the document properties and see which fonts are used in the PDF.
For example, in Acrobat Reader, you could right-click somewhere in the PDF document > Document Properties > Fonts tab.
I noticed that in the resulted PDF one of the default fonts used is "ArialUnicodeMS (Embedded Subset)". This seems to be the default font that renders the symbol correctly.

A solution could be to install that font, in case you do not have it yet, and use it in a customization CSS that you pass to the transformation as a parameter.

Best Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
bloodnok
Posts: 54
Joined: Mon Jun 27, 2011 10:51 pm

Re: Cannot render the ⌥ symbol

Post by bloodnok »

It turns out the issue is the <uicontrol>. When I define ⌥ out in the paragraph, it renders just fine. However, I haven't found any way of embedding single character with a different font than the default text. If you have a workaround that works, please let me know.
Dan
Posts: 501
Joined: Mon Feb 03, 2003 10:56 am

Re: Cannot render the ⌥ symbol

Post by Dan »

Hello,

Please try:

Code: Select all


*[class ~= "ui-d/uicontrol"], .uicontrol {
font-family: "Cambria Math", Symbol;
}
Many regards,
Dan
bloodnok
Posts: 54
Joined: Mon Jun 27, 2011 10:51 pm

Re: Cannot render the ⌥ symbol

Post by bloodnok »

Dan wrote: Tue Mar 19, 2019 3:32 pm

Code: Select all

*[class ~= "ui-d/uicontrol"], .uicontrol {
font-family: "Cambria Math", Symbol;
}
Thanks Dan, but that doesn't work for me. First problem is I haven't Cambria Math on any of my systems. Second is the available Symbol fonts lack a bold glyph, which totally changes the appearance of my <uicontrol> items.

Looks like I'm going to have to write some special case Ant logic in my build script as DITA doesn't support what I need it to do.
Costin
Posts: 833
Joined: Mon Dec 05, 2011 6:04 pm

Re: Cannot render the ⌥ symbol

Post by Costin »

Hi,

Maybe you could use "Segoe UI Symbol" as an alternative?
From what we tested, the Segoe UI Symbol font does have bold font weight, so it should work just fine.

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
Post Reply