Cannot render the ⌥ symbol

bloodnok
Posts: 25

Cannot render the ⌥ symbol

Tue Mar 12, 2019 9:57 pm

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: 505

Re: Cannot render the ⌥ symbol

Wed Mar 13, 2019 1:25 pm

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: 25

Re: Cannot render the ⌥ symbol

Mon Mar 18, 2019 8:09 pm

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: 345

Re: Cannot render the ⌥ symbol

Tue Mar 19, 2019 3:32 pm

Hello,

Please try:

Code: Select all

*[class ~= "ui-d/uicontrol"], .uicontrol {
  font-family: "Cambria Math", Symbol;
}


Many regards,
Dan

Return to “Common Problems”

Who is online

Users browsing this forum: No registered users and 0 guests