throw new java.io.FileNotFoundException(
"Neither an AFM nor a PFM file was found for " + this.fontFileURI);
}
+ if (pfm == null) {
+ //Cannot do without the PFM for now
+ throw new java.io.FileNotFoundException(
+ "No PFM file was found for " + this.fontFileURI);
+ }
buildFont(afm, pfm);
this.loaded = true;
}
returnFont.setCapHeight(returnFont.getAscender());
}
+ /* DISABLED because of mismatch with our using WinAnsiEncoding and the AFM
+ delivering the font's default encoding.
if (afm != null) {
//TODO returnFont.setFlags(flags);
+
returnFont.setFirstChar(afm.getFirstChar());
returnFont.setLastChar(afm.getLastChar());
Iterator iter = afm.getCharMetrics().iterator();
}
}
returnFont.replaceKerningMap(afm.createXKerningMapEncoded());
- } else {
+ } else {*/
returnFont.setFlags(pfm.getFlags());
returnFont.setFirstChar(pfm.getFirstChar());
returnFont.setLastChar(pfm.getLastChar());
singleFont.setWidth(i, pfm.getCharWidth(i));
}
returnFont.replaceKerningMap(pfm.getKerning());
- }
+ //}
}
private CodePointMapping buildCustomEncoding(String encodingName, AFMFile afm) {