DITA and XMetaL Discussion
Fa December 15, 2009 at 11:52 am
Chinese titles and punctuation not displaying in pdf (DITA).December 15, 2009 at 11:52 amParticipants 5Replies 6Last Activity 12 years, 9 months ago
I hope this is the right place for this post, since I'm using DITA with XMetaL.
So here's in little more details the issues I experience:
First I could not display any Chinese at all in my pdf documents, which would only display the numbers and pictures and leave all the rest blank.
Then, following instructions in this post [url=http://forums.xmetal.com/index.php/topic,116.msg1254.html#msg1254]http://forums.xmetal.com/index.php/topic,116.msg1254.html#msg1254[/url] and this post [url=http://forums.xmetal.com/index.php/topic,366.0.html]http://forums.xmetal.com/index.php/topic,366.0.html[/url], I got most of the Chinese texts to display, except for the punctuation and the titles.
However, the title texts are also found in the header, but smaller than regular text, and they display correctly, whereas the titles themselves should have a bigger font size. So could it be that there is some kind of limitation on the size that prevents it from displaying? If so, how can I force Chinese title texts to be smaller, but still keep my default values for other languages?
Regarding the punctuation, it seems that punctuation specific to Chinese can be displayed (I don't know how you call them, but I mean the special comas for enumeration or the Chinese full stop, for instance). Also, any punctuation entered as English charachter will display, but the same symbols (comas, colons,…) won't show.
Any ideas on how to fix this?
Thank you very much in advance for your tips and advices!
And merry Christmas!
Edit on Dec. 16th: I'm running Enterprise version 5.5.Fa December 16, 2009 at 10:53 am
Reply to: Chinese titles and punctuation not displaying in pdf (DITA).December 16, 2009 at 10:53 am
So it seems I got the title issue solved. It was due to a wrong mapping of font families, but unfortunately, the punctuation issue remains unsolved. Any tip would be welcome!
FabienDerek Read December 16, 2009 at 10:12 pm
Reply to: Chinese titles and punctuation not displaying in pdf (DITA).December 16, 2009 at 10:12 pm
Which font is being used?
The missing punctuation really sounds like missing glyphs in the font to me (which means that RenderX has nothing to embed into the PDF for these characters so you see blanks instead).
Check to see that the font you are using has these glyphs using Windows charmap.exe or by setting Notepad to use the font and pasting the characters into it.
If we are talking about the “fullwidth” punctuation characters in the Unicode range U+FF01 to U+FF60, it does seem surprising that a Chinese font would not implement at least the basic fullwidth glyphs, perhaps at least U+FF01 to U+FF20, which are basically the fullwidth forms of U+0021 to U+002F = !"#$%&'()*+,-., but it is possible.
The reason punctuation “entered as English” might work is simply because these would be punctuation characters from the Unicode ranges U+0021 to U+002F (!"#$%&'()*+,-./) and maybe U+003A to U+003F (:;<=>?) and practically all fonts would have glyphs for them. The U+0020 to U+007E range is basically a lowest common denominator, the characters being equivalent to the visible (non-control) characters of ASCII which every font is almost sure to implement glyphs for regardless of the primary language the font was designed for.Derek Read December 16, 2009 at 10:56 pm
Reply to: Chinese titles and punctuation not displaying in pdf (DITA).December 16, 2009 at 10:56 pm
I see that in my current version of Notepad when a particular font is missing glyphs the characters may still render. This was not the case in previous versions, where characters with missing glyphs would render using the “missing glyph” picture — an empty square.
This is most likely because I have the “Asian Languages Pack” installed on my copy of XP, which adds a font fall-back mechanism to some applications like Notepad, where the system will search for a font that has the glyph when the current font does not have one and substitute it. So, Notepad may not be the best way to figure out if a particular font has a particular glyph. I'll post some screenshots to make this clear.
I'd stick with charmap.exe if you need to be really sure for fonts you already have installed.
One other possibly very useful tool for figuring this stuff out, which would help greatly for people that need to decide if a font will work when they purchase or license it (some fonts require licensing to allow you to embed them) is this website which helps to find fonts that have glyphs for a particular character: http://www.fileformat.info/info/unicode/char/search.htmDerek Read December 16, 2009 at 11:40 pm
Reply to: Chinese titles and punctuation not displaying in pdf (DITA).December 16, 2009 at 11:40 pm
Character Map screenshots showing:
A: “Arial Unicode MS” is being searched. Unicode characters with a description containing “fullwidth” are shown. In my copy glyphs for all of the “fullwidth” characters defined in Unicode 5 are in there.
B: “Times New Roman” is being searched. Unicode characters with a description containing “fullwidth” are shown. This font contains no glyphs for these characters.
A text file containg characters in the following ranges is loaded into Notepad, showing:
C: “Arial Unicode MS” has all the glyphs (note the uniformity).
D: “Times New Roman” does not have the glyphs for the fullwidth forms.
E: This is “Times New Roman” again, but this is running on a machine with the optional Windows “Install files for East Asian languages” option turned on (part of Regional and Language Settings in Control Panel). Note that the “ASCII” range uses the Times New Roman font while the “Fullwidth Forms” is using a different font.Fa December 18, 2009 at 7:23 am
Reply to: Chinese titles and punctuation not displaying in pdf (DITA).December 18, 2009 at 7:23 am
Thank you very much Derek,
I now got all the missing characters to display. At the root of the problem was that, although those marks (range U+FF01 – U+FFE5) were present in the font file (displayed in windows character map), they were left out of the range defined by default for zh_CN.xml file under C:Documents and SettingsMYUSERNAMEApplication DataSoftQuadXMetaL SharedDITA_OTdemoxmfocfgfoi18n.
For information, I use the Simsun font for body text and Simhei for titles.
What I did was just to include them, so I replaced the following
and that solved the issue.
Again, thank you very much for your help Derek!
Merry Christmas to all of you!
FabienDerek Read December 18, 2009 at 8:18 pm
Reply to: Chinese titles and punctuation not displaying in pdf (DITA).December 18, 2009 at 8:18 pm
Thanks for the good news.
(the following is really more for other people interested in more detail about what we discussed offline…)
The DITA OT decides which file from the i18n folder to use based on xml:lang attribute values. The default file used by the DITA OT is en_US.xml when no xml:lang settings are found (or the DITA OT has not been modified to do something else). In this case “Fa” has already configured the DITA OT to recognize and use cn_ZH as the language for processing his files. If you are working with other languages that also happen to have certain characters missing you may need to adjust the corresponding file for that language (or create one for languages that the DITA OT has omitted).
Also, regarding the actual path to these files…If you only need to worry about yourself and are not planning to deploy these changes to multiple machines the folder specified by “Fa” should work for you. To find this folder on any Windows machine you should be able to enter the following into Windows Explorer: %appdata%SoftQuadXMetaL SharedDITA_OTdemoxmfocfgfoi18n
However, keep in mind that if you were to tell XMetaL Author Enterprise to redeploy the DITA OT the changes you have made would be lost (overwritten) as that folder is the “deployed” copy of the DITA OT (so you would need to avoid doing that). For that reason, or if you need to deploy these changes to other users you will want to place the file in the following location and then get XMetaL Author Enterprise to redeploy the toolkit: C:Program FilesCommon FilesXMetaL SharedDITA_OTdemoxmfocfgfoi18n The following topic, and the one it links to, talks about deployment of the DITA OT: http://forums.xmetal.com/index.php/topic,237
Something else left out of this discussion is that “XMetaL Enhanced PDF via RenderX XEP” is being used as the deliverable by “Fa” to produce his PDF files. Similar modifications would need to be made to the files used by “Book via RenderX” (aka: the DITA OT “PDF2” transtype), if you are using that instead.
- You must be logged in to reply to this topic.