@Override public boolean hasGlyph(int code) throws IOException { if (font.isEmbedded()) { int gid = font.codeToGID(code); return gid != 0; } return false; } }
@Override public GeneralPath getNormalizedPath(int code) throws IOException { boolean hasScaling = ttf.getUnitsPerEm() != 1000; float scale = 1000f / ttf.getUnitsPerEm(); int gid = codeToGID(code); GeneralPath path = getPath(code); // Acrobat only draws GID 0 for embedded or "Standard 14" fonts, see PDFBOX-2372 if (gid == 0 && !isEmbedded() && !isStandard14()) { path = null; } if (path == null) { // empty glyph (e.g. space, newline) return new GeneralPath(); } else { if (hasScaling) { path.transform(AffineTransform.getScaleInstance(scale, scale)); } return path; } }
@Override protected Encoding readEncodingFromFont() throws IOException if (!isEmbedded() && getStandard14AFM() != null)
@Override public boolean hasGlyph(int code) throws IOException { if (font.isEmbedded()) { int gid = font.codeToGID(code); return gid != 0; } return false; } }
@Override public boolean hasGlyph(int code) throws IOException { if (font.isEmbedded()) { int gid = font.codeToGID(code); return gid != 0; } return false; } }
@Override public GeneralPath getNormalizedPath(int code) throws IOException { boolean hasScaling = ttf.getUnitsPerEm() != 1000; float scale = 1000f / ttf.getUnitsPerEm(); int gid = codeToGID(code); GeneralPath path = getPath(code); // Acrobat only draws GID 0 for embedded or "Standard 14" fonts, see PDFBOX-2372 if (gid == 0 && !isEmbedded() && !isStandard14()) { path = null; } if (path == null) { // empty glyph (e.g. space, newline) return new GeneralPath(); } else { if (hasScaling) { path.transform(AffineTransform.getScaleInstance(scale, scale)); } return path; } }
@Override protected Encoding readEncodingFromFont() throws IOException if (!isEmbedded() && getStandard14AFM() != null)
@Override protected Encoding readEncodingFromFont() throws IOException if (!isEmbedded() && getStandard14AFM() != null)