Search
Sunday, September 07, 2008 ..:: Wiki ::.. Register  Login
Which fonts work with which languages

What font to use

A font is a collection of glyphs (characters) that are drawn in an identical style. This paragraph is written in Times New Roman and is using the glyphs in the Latin range. Characters are the individual letters such as A or $. So A is the character A in the Courier New font.

Now here is where it gets tricky. Creating a font requires creating a glyph to map to each character than will be rendered. This take time and is expensive. As there are approximately 64,000 characters in the unicode standard, this could become incredibly expensive, especially when English and the Western European languages only need about 256 of those 64,000 characters rendered.

So most fonts only have glyphs for part of the full character set. This becomes a problem is you use a font such as Arial that does not have Asian glyphs to write out Chinese text. What you will get is blank spaces for the text. And it’s not just Asian or no Asian, the font MingLiU has glyphs for Chinese and Japanese, but not Korean.

When you write in Word, it will map in a font that has the characters you are typing. But when you have an out tag, Word has no way of knowing what characters will be brought in at that tag. So you can have an out tag using Arial and the data is an Asian character set and all you get is blanks.

In many cases Word and Excel will not have a problem with generated reports using fonts that have no glyphs for the characters used as it will substitute (not always). And browsers also handle this pretty well. But for PDF you must use a font that has the required glyphs.

If you think this is happening, the first step to check is to use the font Arial Unicode MS (which this paragraph is in). This font contains a glyph for every character. (The reason this font is more spread out is it needs room for characters from any language.)

Click here to open a zip file with a sample template, xml file with text in multiple languages, and the pdf created from running it. The text is not shown here because the html page does not handle the fonts the same as Word or Acrobat. Below is a screenshot of the generated PDF using the various fonts.

 




 |  View Topic History  |
Membership Membership:
Latest New User Latest: louisedean
New Today New Today: 0
New Yesterday New Yesterday: 0
User Count Overall: 55

People Online People Online:
Visitors Visitors: 16
Members Members: 0
Total Total: 16

Online Now Online Now:
All contents copyright (c) 2002 - 2008 by Windward Studios, Inc. All Rights Reserved.   Terms Of Use  Privacy Statement