String subtype = font.getSubType(); if (FONT_DICTIONARY_VALUE_TRUETYPE.equals(subtype))
public boolean equalToPDFont(PDFont compare) { // Appears you can have two different fonts with the same actual font name since text position font // references go off a seperate dict lookup name. PDFBox doesn't include the lookup name with the // PDFont, so might have to submit a change there to be really sure fonts are indeed the same. return compare.getName().equals(baseFont.getName()) && compare.getType().equals(baseFont.getType()) && compare.getSubType().equals(baseFont.getSubType()); }
@Override public String getSubtype() { String subtype = null; if (this.pdFontLike instanceof org.apache.pdfbox.pdmodel.font.PDFont) { subtype = ((org.apache.pdfbox.pdmodel.font.PDFont) this.pdFontLike).getSubType(); } else if (this.pdFontLike instanceof PDCIDFont) { subtype = ((PDCIDFont) this.pdFontLike).getCOSObject().getNameAsString(COSName.SUBTYPE); } return subtype; }
private static boolean fontProgramIsNull(org.apache.pdfbox.pdmodel.font.PDFont font) { if(font instanceof PDType3Font) { return false; } else if(font instanceof PDType0Font) { return descendantFontProgramIsNull((PDType0Font) font); } else if (!font.getSubType().equals(FontFactory.TYPE_3) && (font.isEmbedded())) { PDStream fontFile; if (font.getSubType().equals(FontFactory.TYPE_1) || font.getSubType().equals(FontFactory.MM_TYPE_1)) { if (font instanceof PDType1CFont) { fontFile = font.getFontDescriptor().getFontFile3(); } else { fontFile = font.getFontDescriptor().getFontFile(); } } else if (font.getSubType().equals(FontFactory.CID_FONT_TYPE_2) || font.getSubType().equals(FontFactory.TRUE_TYPE)) { fontFile = font.getFontDescriptor().getFontFile2(); } else { fontFile = font.getFontDescriptor().getFontFile3(); } if (fontFile != null) { return false; } } return true; }
String subtype = font.getSubType(); if (FONT_DICTIONARY_VALUE_TRUETYPE.equals(subtype))
String subtype = font.getSubType(); if (FONT_DICTIONARY_VALUE_TRUETYPE.equals(subtype))
if (font.getSubType().equals(FontFactory.TYPE_0)) { int CID = ((PDType0Font) font).codeToCID(code); glyph = new PBCIDGlyph(glyphPresent, widthsConsistent, font, code, CID,
return null; switch (font.getSubType()) { case FontFactory.TYPE_1: case FontFactory.MM_TYPE_1:
return null; switch (pdfboxFont.getSubType()) { case TYPE_0: return new PBoxPDType0Font(pdfboxFont, renderingMode, document, flavour);
if (fontLike instanceof PDFont) { PDFont font = (PDFont) fontLike; this.type = font.getSubType(); if (!(font instanceof PDType3Font)) { this.baseFont = font.getName();