How to Create a New Khmer Unicode Font

Mondulkiri-VoltThe creator of the Khmer Unicode font Mondulkiri has graciously included everything you need to know in the developer font pack for the Khmer Mondulkiri font including a VOLT tables for Khmer.

DOWNLOAD the Khmer Font Developer pack from SIL here

Contained in this zip file there is a “source” folder that includes documentation as well as source files for creating a Khmer Unicode font that will work correctly both on Mac and PC.

Mondulkiri-files

Here’s the short tutorial from the author of the Mondulkiri font contained in the Font building instructions.pdf in the “/source/” folder:

“A few tips for (beginning) font developers

Khmer Unicode fonts consist of the actual outlines of the letters as well as instructions for
the rendering system how to assemble a string of characters into the visual image.
The Mondulkiri fonts contain the following elements:
1. The basic font with all the basic outlines.
2. Instructions for the OpenType rendering system. 3. Instructions for the AAT rendering system.

The basic font with all the basic outlines

To create a basic font file with all the outlines a font editor like FontLab (commercial) or FontForge (open source) is needed.

The instructions for the OpenType rendering system

The OpenType (OT) instructions for this font were created with the VOLT tool from
Microsoft1. Once the basic font is opened in VOLT, the instructions can can be loaded with
ʻImport – Projectʼ and compiled. Make sure glyph shapes and names match, using the Edit
Glyphs window. If they donʼt match the glyphs in the font are not ordered in the same way
as they were in the font with which the project was created (or glyphs were added or
deleted). In that case the postscript names in the font need to be ʻimported for all glyphs,
then edited in regard to their type and number of components in the Glyph Editor. Then the
Glyph Data can be exported and merged with the original project file in a text editor. Then
the project can be imported (Using ʻImport anchor by glyph nameʼ) for the new font. Before
giving the font to other users the VOLT-readable tables should be removed with ʻFile – Ship
Fontʼ.
The Mondulkiri fonts require a version of VOLT 1.1.225 or earlier. Some newer versions
refuse compilation because on the non-standard use of anchors in the font.
It may be necessary to add the OT tables before the AAT tables for the font to work
properly.

The instructions for the AAT rendering system

Apple provides some tools for working with fonts. The Mondulkiri fonts have been
produced using version 3.1.0 of the Apple Font Tools (https://developer.apple.com/fonts/)
on OS X 10.6.8. The newer version of Font Tools needed with OS X 10.8 introduced some
problems with some general tables in the font (as of August 2012).
To add the AAT instructions to the font open Terminal, change to the directory with the font
and the instruction files (enter ʻcd ʻ, drag a file from the desired directory into the window,
delete the name of the file and press enter). The following two commands add the
composite glyphs needed for the AAT tables and then add the AAT tables. The case of the
letters of the options is significant:
ftxenhancer -A khmer4add.xml fontname
ftxenhancer -m Khmermif.txt fontname

1 http://www.microsoft.com/typography/volt.mspx

Finishing off

To finish the font off the following steps in Windows are recommended:
1. Recreate some of the tables in the font using the Micorsoft commandline tools
cachett.exe and fastfont.exe (http://www.microsoft.com/typography/tools/tools.aspx).
The case of the letters of the options and table names is significant, the programs need
to be in the same folder as the font or the full path needs to be used (or they need to be
in the path).
cachett -TLTSH fontname x.ttf
cachett -Thdmx x.ttf fontname
fastfont fontname
2. As last step the font should be checked for errors with Microsoftʼs free Font Validator
(http://www.microsoft.com/typography/fontvalidator.mspx). The ftxenhancer may not
update the values for xMin xMax yMin and yMax for the extreme points in all the glyphs
when using the -A option. This error can be worked around by adding tiny outlines with
these extreme points to an unused glyph in the font, so that those values are generated
by the font editor.
3. In order for Stylistic Sets in fonts to work in Microsoft Word, these fonts need to be
digitally signed. However, as of Word 2010 in June 2012 Microsoft Word does not
appear to support Stylistic Sets for the Khmer script.
Note: Font Validator will consider the values of the VDMX table to be incorrect. However,
the VDMX table should not be regenerated with cachett. The cause for this error is that
some glyphs of Khmer letters that are rarely used, exceed the Ascender and Descender
set in the font editor. If the VDMX table is regenerated, programs will later display the font
much smaller than desired.”

Google Web Fonts API for Khmer Unicode

One of the issues in the past for using Khmer Unicode on a website was you never knew which fonts the end-user had.  If they just have the default fonts from Microsoft, they won’t really be able to read your site at all.  Now there is a solution – the Google Web Font API with Khmer fonts thanks to Danh Hong!  If you have a website that uses Khmer Unicode you are going to want to check this out:

VISIT: Google Web Fonts API for Khmer

Khmer SBBIC Serif Font

One of the issues with the current Khmer Unicode fonts is the English characters included do not look good (and this is understandable as they were not meant to be used as English fonts). But for some, we use both English and Khmer, in certain documents and so having a font that displays Khmer and English properly is necessary. We recently combined the KhmerOS Battambang font with Droid Serif to create an appealing sans-serif font for both English and Khmer.

DOWNLOAD: Khmer SBBIC Serif Font (2087)

Preview of Khmer SBBIC Sans-Serif Font

Khmer SBBIC Unicode System Font

One of the issues with the current Khmer Unicode fonts is the English characters included do not look good (and this is understandable as they were not meant to be used as English fonts).  But for some, we use both English and Khmer, especially when it comes to a system user interface (like OpenOffice).  We recently combined the KhmerOS System font with Liberation Sans to create an appealing system font for both English and Khmer.  For instructions on how to use this font as your system font in OpenOffice please click here.

DOWNLOAD: Khmer Unicode SBBIC System Font


KhmerOS System Font

SBBIC System Font