// Check if the font is embeddable
if (desc.isEmbeddable()) {
- PDFStream stream = makeFontFile(desc);
+ AbstractPDFStream stream = makeFontFile(desc);
if (stream != null) {
descriptor.setFontFile(desc.getFontType(), stream);
getDocument().registerObject(stream);
* @param desc FontDescriptor of the font.
* @return PDFStream The embedded font file
*/
- public PDFStream makeFontFile(FontDescriptor desc) {
+ public AbstractPDFStream makeFontFile(FontDescriptor desc) {
if (desc.getFontType() == FontType.OTHER) {
throw new IllegalArgumentException("Trying to embed unsupported font type: "
+ desc.getFontType());
return null;
} else {
try {
- PDFStream embeddedFont;
+ AbstractPDFStream embeddedFont;
if (desc.getFontType() == FontType.TYPE0) {
MultiByteFont mbfont = (MultiByteFont)font;
FontFileReader reader = new FontFileReader(in);
private int avgWidth = 0;
private int maxWidth = 0;
private int missingWidth = 0;
- private PDFStream fontfile;
+ private AbstractPDFStream fontfile;
// private String charSet = null;
private FontType subtype;
* @param subtype the font type defined in the font stream
* @param fontfile the stream containing an embedded font
*/
- public void setFontFile(FontType subtype, PDFStream fontfile) {
+ public void setFontFile(FontType subtype, AbstractPDFStream fontfile) {
this.subtype = subtype;
this.fontfile = fontfile;
}