-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docx Reader: w:sym[w:font="Wingdings" w:char="..."]
seems not supported
#9220
Comments
Direct link on w:sym: https://c-rex.net/samples/ooxml/e1/Part4/OOXML_P4_DOCX_sym_topic_ID0EXIHQ.html |
We could simply insert the specified Unicode character (subtracting F000 if it's >= F000). |
I guess I misunderstood the documentation for w:char, which said:
So I assumed this was a standard unicode U+0045. But apparently it's not because (experimentally) using a sym with F045 gives you pointing hand character. |
I am afraid we'd need a manual conversion table inside Pandoc. Would that be recommended to your opinion? |
Oddly it seems to be which according to the table you linked to is 1069 decimal. 0x45 = 69. |
Another issue; not all Wingdings 'equivalents' aren't rendered properly in the browser, it seems.. I'd almost suggest just representing them as "Wingding" in the output HTML, since my browser seems to recognize that font just right. Regarding the conversion tables I am as confused as you must be. |
OK, the second table you linked to seems more useful; it has 0x0045 = left pointing hand. |
Also, please note that there are 4 fonts: Wingdings 1, Wingdings 2, Windings 3 and Webdings. I am not sure if the functionality and logic behind them would differ in any way? |
Here's the table in more convenient form:
|
Wingdings 2:
|
Wingdings 3:
|
Webdings:
|
That's quite useful. What is your thought on the UTF-equivalents not being rendered properly in all browsers? If we take |
Those are just placeholders to indicate that the glyph is not in the font, I think. |
Won't that give us issues when converting a document to HTML that includes these? |
Well, you'd have to specify (in CSS) a font that contains these glyphs. But pandoc doesn't deal with that sort of thing. |
I think I've fixed this, but it needs more extensive testing. If you could upload a docx with this feature, I could try it. Be aware that if the font you're using doesn't contain the glyph, you might get the box character. Try |
The document above is |
I'm now getting "Home [right-pointing-triangle-symbol] Paragraph" which I think is correct. |
Explain the problem.
When converting a document, the
w:sym
element seems not to be supported. This seems to represent a custom character in docx's.In the document it is being represented as a specific custom character
<w:sym>
in ECMA-376 Part 1 under section 17.3.3.30 sym (Symbol Character).Pandoc version: 3.1.8
The text was updated successfully, but these errors were encountered: