About Arbortext Styler > Non-Latin Language Support > Combined Fonts
Combined Fonts
A combined font allows you to specify that different system fonts should be used to display certain characters (or character blocks or script groups) from the Unicode specification in the document's text.
For example, you might want to define the default font Arial for the majority of the characters in a paragraph, but specify that any characters from the East Asian Scripts script group that appear in the paragraph's text should be displayed with the SimSum font. This preference can be defined by creating a combined font, and assigning this font to the relevant paragraph element in your document.
The character and character range options presented in the properties area for a combined font object are based on the Unicode specification. Refer to http://www.unicode.org/charts/ for information.
For print and PDF, you must publish documents that use combined fonts with the PTC ALD print engine. See Logic for Print/Preview Engine Selection for information on how to set the active print engine setting for your PTC Arbortext environment.
When you export an Arbortext Styler stylesheet that uses combined font definitions to XSL-HTML, XSL-HTML Help, or XSL-Web formats, the exported stylesheet contains the processing instruction (PI) <?APT combined-font-defn...?>. One PI for each combined font appears at the start of each output file. Each PI specifies the details of the combined fonts used in the original stylesheet, by confirming the combined font's name and the list of Unicode point ranges it defines, along with the fonts assigned to each range.
If you subsequently use the exported stylesheet outside of Arbortext Styler to generate HTML output, the PI is included in the generated HTML. The PI is removed when publishing to HTML in Arbortext Styler.
Example: Creating a Combined Font
In this example you will create a combined font that supports the following font use in the same paragraph:
Default font for paragraph - Arial
Default font for characters from the East Asian Scripts script group - MS Mincho
Font for characters from the Japanese Katakana character block (a subset of the East Asian Scripts script group) - SimSun
This procedure advises how to create the combined font and assign it to the relevant paragraph context.
1. In Arbortext Editor, open the transport.xml document located at Arbortext-path/samples/styler
2. Choose Styler > Edit Stylesheet to open the stylesheet currently associated with the document for edit. This is a read only stylesheet so you will need to save a local copy if you want to make amendments.
3. Configure your Arbortext Editor with Styler environment to use PTC ALD as the effective print engine. See Logic for Print/Preview Engine Selection for a description of the hierarchy of print engine settings.
4. Choose the Insert > Combined Font menu option. The Combined Fonts list The Combined Fonts list icon - a blue A in the bottom right corner and a red katakana character in the top left corner opens, if it is not already active, with a new combined font object New Combined Font highlighted in the list. Rename the combined font object as required.
Certain restrictions apply for the name of a combined font. As a general rule, you cannot use the same name as an PTC Arbortext system font:
Reserved font family names, for example serif, sanserif — do not use in any case
Built in fonts, for example arbortext — do not use in any case
Installed system fonts, for example Arial
In the same case as the installed font (Arial) — may be used as a combined font name
In this instance the combined font overrides the installed font.
With a case variation (arial, ARIAL) — do not use as a combined font name
5. In the properties area of the Combined Fonts list, select Arial from the Default font list.
Here you have selected the font to be used to display the majority of characters in a paragraph. In the next steps you will create exceptions to this default, where you specify the fonts to display particular characters in the text.
6. Click New. A new exception line is created in the font list.
7. In the Character Set field, select the character block or type for which you are defining the font, in this case East Asian Scripts. Script groups are displayed in bold text, while character blocks are shown in normal text.
8. In the Font field, select MS Mincho
Here you have specified that any characters from the East Asian Scripts script group will be displayed using the MS Mincho font.
9. Click New again to create a second exception to the default font setting. This time, select Katakana from the Character Set list, and SimSun from the Font list.
Here you have specified that Katakana characters, although they also belong to the East Asian Scripts script group, should be displayed in SimSun font rather than the default MS Mincho font defined for the script group.
The creation of the combined font is now complete:
This image shows the combined font in the Combined Fonts list, with the font settings Default font=Arial, East Asian Scripts=MS Mincho, and Katakana=SimSun specified
10. The next step is to assign the font setting to the relevant paragraph context in your stylesheet. In the Elements list The Elements list icon - the yellow element icon, select the para everywhere else context.
11. In the Text category for the context, select your combined font from the list of available fonts in the Font family field. You will see that the combined font is distinguished from the list of installed system fonts with a combined font icon (see CombinedFont, below)
This image shows the CombinedFont font identified with the Combined Font icon, a blue A in the bottom right corner and a red katakana character in the top left corner
12. Choose Preview > Print. In the PTC ALD preview that appears, note that any East Asian Scripts characters, and any Katakana characters, are displayed correctly.