Assert.assertNotNull(post);
String[] glyphNames = arial.getPostScript().getGlyphNames();
Assert.assertNotNull(glyphNames);
Encoding enc = new WinAnsiEncoding();
int[] charCodes = uc.getGlyphIdToCharacterCode();
Assert.assertNotNull(charCodes);
for (int gid = 0; gid < charCodes.length; ++gid)
{
int charCode = charCodes[gid];
String name = glyphNames[gid];
if (charCode < 0x8000 && charCode >= 32)
{
if ("space".equals(name) || "slash".equals(name)
|| "bracketleft".equals(name)
|| "bracketright".equals(name)
|| "braceleft".equals(name)
|| "braceright".equals(name) || "product".equals(name)
|| "integral".equals(name) || "Omega".equals(name)
|| "radical".equals(name) || "tilde".equals(name))
{
Assert.assertTrue(enc.getNameFromCharacter((char) charCode)
.startsWith(name));
}
else if ("bar".equals(name))
{
Assert.assertTrue(enc.getNameFromCharacter((char) charCode)
.endsWith(name));
}
else if ("germandbls".equals(name))
{
Assert.assertEquals("xff",
enc.getNameFromCharacter((char) charCode));
}
else if ("sfthyphen".equals(name))
{
Assert.assertEquals("softhyphen",
enc.getNameFromCharacter((char) charCode));
}
else if ("periodcentered".equals(name)
&& !enc.getNameFromCharacter((char) charCode).equals(
name))
{
Assert.assertEquals("bulletoperator",
enc.getNameFromCharacter((char) charCode));
}
else if ("fraction".equals(name))
{
Assert.assertEquals("divisionslash",
enc.getNameFromCharacter((char) charCode));
}
else if ("mu".equals(name))
{
Assert.assertEquals("mu1",
enc.getNameFromCharacter((char) charCode));
}
else if ("pi".equals(name))
{
Assert.assertEquals(0x03c0, charCode);
}
else
{
Assert.assertEquals(
enc.getNameFromCharacter((char) charCode), name);
}
}
}
}