XMetaL Tips and Tricks
Derek Read July 27, 2009 at 5:58 pm
Reply to: Script Example: Custom Special Characters Form (XFT)July 27, 2009 at 5:58 pm
There is no limitation that I'm aware of.
You might be thinking that because the DITA OT only uses 'Sans', 'Serif' and 'Monospaced' that there is a limitation, but that is not really the case. However, though you can define others, I don't believe that is really what you want to do here as these 'font alias names' (the XEP term) are used in almost every XSLT file used to generate the XSL-FO consumed by RenderX XEP.
I believe the simplest solution is to specify a font for each of the above that contains glyphs for Greek characters, such as “Arial” for 'Sans', “Times New Roman” for 'Serif' and “Courier New” for 'Monospaced'. I suggest these fonts because they are installed by default on every Windows XP and Vista machine and they contain the glyphs you need for Greek (open the font using the Windows Character Map tool to see all the characters / glyphs). The other post (http://forums.xmetal.com/index.php/topic,366.0.html) should get you there. One thing to note is that the file xep.xml already contains an entire section commented out that maps a bunch of fonts installed on standard Windows machines to their font files in the C:WindowsFonts folder (so that XEP can find them). They include “Arial”, “Times New Roman” and “Courier New”, so for that part you just need to uncomment that section in that file.
The alternative, more complex solution (which should not be necessary for Greek if you specify the fonts above) is to tell RenderX XEP to vary the font used by 'char-set'. That is done partially inside the font-mappings.xml file. The font-mappings.xml file that ships with the DITA OT includes settings for the following 'char-sets': “default”, “Simplified Chinese”, “Japanese”, “Korean”, “Symbols”, “SubmenuSymbol”, and “SymbolsSuperscript”. The actual character sets that these names represent are defined in the file
demofocfgfoi18nen_US.xml(or the language file currently being used if xml:lang is not en_US and you have configured the DITA OT and your files to use xml:lang). So, if you need to further tweak this that is where the actual character sets are configured (ie: which sets of characters belong to “default”, “Simplified Chinese”, “Japanese”, etc).jstaggart July 27, 2009 at 7:03 pm
Reply to: Script Example: Custom Special Characters Form (XFT)July 27, 2009 at 7:03 pm
My problem is I have already mapped sans, serif, and monospaced to Univers 45, Univers 57, and Univers 47. These fonts are our corporate standard. I tried pointing the charset for Greek to Arial, but this did not work. The Greek only outputs if I change either sans, serif, or monospaced to Arial. Am I out of luck with this?Derek Read July 27, 2009 at 10:15 pm
Reply to: Script Example: Custom Special Characters Form (XFT)July 27, 2009 at 10:15 pm
In this case I believe you are going to be forced to the more advanced functionality I was referring to that use the “char-sets”. Unfortunately I do not have any instructions handy for that and I'm not sure how quickly I can come up with something.
It would likely be most efficient to do this through our Professional Services team as I believe they have helped several clients configure the OT in a similar way for their specific needs. Sales can put you in contact if you want to do it that way.Derek Read July 27, 2009 at 11:03 pm
Reply to: Script Example: Custom Special Characters Form (XFT)July 27, 2009 at 11:03 pm
OK, a quick test shows that this isn't too hard to figure out.
With a default installation prior to DITA OT deployment you need to modify the following three files:
C:Program FilesCommon FilesXMetaL SharedRenderXxep.xml
Uncomment the section that enables the Windows font mappings to the fonts “Arial”, “Times New Roman”, “Courier New”, “Tahoma”, “Verdana” and “Palatino”. The line just before that section of the file has the following comment:
C:Program FilesCommon FilesXMetaL SharedDITA_OTdemoxmfocfgfofont-mappings.xml
Add a new 'physical font' section inside each of the 'logical font' sections in that file to specify that Greek characters should be treated specially. You can call the 'char-set' anything you like provided it matches the setting in the next file (below). Note: If you prefer to use other fonts (perhaps you have a fancy one that you like to use just for Greek) you would first need to add a new section telling XEP where that font is in the previous file (above).
Here are the new 'physical font' sections I've added to font-mappings.xml:
…leave existing settings…
…leave existing settings…
Times New Roman
…leave existing settings…
C:Program FilesCommon FilesXMetaL SharedDITA_OTdemoxmfocfgfoi18nen_US.xml (or the actual file being used if you are using xml:lang)
Add a new 'alphabet' section with a 'char-set' value that is the same as you used in the previous file above. Here's mine:
Note that these values represent the main section for Greek characters defined in Unicode 5. If you use other characters that should be in there you'll need to expand that section. The ja_JP.xml file is perhaps a better example to look at as it is more complex than the default en_US.xml file.
- You must be logged in to reply to this topic.