* Contains multiple mapping tables from Unicode and various 8-bit encodings to glyph ids.
* Multi-platform.
*/
private void processCmapTable(Font font)
{
CmapTable cmap = font.getCmapTable();
if (cmap != null)
{
// Decide upon a cmap table to use for our character to glyph look-up
if (forceAscii)
{
// We've been asked to use the ASCII/Macintosh cmap format
cmapFmt = cmap.getCmapFormat(Table.platformMacintosh, Table.encodingRoman);
platformID = PLATFORM_MACINTOSH;
encodingID = ENCODING_ROMAN;
}
else
{
// The default behaviour is to use the Unicode cmap encoding
cmapFmt = cmap.getCmapFormat(Table.platformMicrosoft, Table.encodingUGL);
if (cmapFmt == null)
{
// This might be a symbol font, so we'll look for an "undefined" encoding
cmapFmt = cmap.getCmapFormat(Table.platformMicrosoft, Table.encodingUndefined);
platformID = PLATFORM_MICROSOFT;
encodingID = ENCODING_UNDEFINED;
}
else
{