Page 1 of 1

Cannot render the ⌥ symbol

Posted: Tue Mar 12, 2019 9:57 pm
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?

Re: Cannot render the ⌥ symbol

Posted: Wed Mar 13, 2019 1:25 pm
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

Re: Cannot render the ⌥ symbol

Posted: Mon Mar 18, 2019 8:09 pm
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.

Re: Cannot render the ⌥ symbol

Posted: Tue Mar 19, 2019 3:32 pm
by Dan
Hello,

Please try:

Code: Select all


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

Re: Cannot render the ⌥ symbol

Posted: Wed Mar 27, 2019 8:08 pm
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.

Re: Cannot render the ⌥ symbol

Posted: Thu Mar 28, 2019 11:08 am
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