* @throws ValidationException
* if the FontProgram doesn't have the expected CMap
*/
protected CMAPEncodingEntry[] getCMapOfFontProgram(TrueTypeFont ttf)
throws ValidationException {
CMAPTable cmap = ttf.getCMAP();
if (this.pFontDesc.isSymbolic()) {
return cmap.getCmaps();
} else {
List<CMAPEncodingEntry> res = new ArrayList<CMAPEncodingEntry>();
boolean firstIs31 = false;
for (CMAPEncodingEntry cmapEntry : cmap.getCmaps()) {
// ---- Returns the WinAnsiEncoding CMap
if ((cmapEntry.getPlatformId() == 3) && (cmapEntry.getPlatformEncodingId() == 1)) {
res.add(0,cmapEntry);
firstIs31 = true;
} else if ((cmapEntry.getPlatformId() == 1)&& (cmapEntry.getPlatformEncodingId() == 0)) {