@Override public Type1CharString getType1CharString(String name) throws IOException { return CFFType1Font.this.getType1CharString(name); } }
@Override public float getWidth(String name) throws IOException { return getType1CharString(name).getWidth(); }
@Override public GeneralPath getPath(String name) throws IOException { return getType1CharString(name).getPath(); }
@Override public float getHeight(int code) throws IOException { String name = codeToName(code); float height = 0; if (!glyphHeights.containsKey(name)) { height = (float)cffFont.getType1CharString(name).getBounds().getHeight(); // todo: cffFont could be null glyphHeights.put(name, height); } return height; }
@Override public float getStringWidth(String string) throws IOException { float width = 0; for (int i = 0; i < string.length(); i++) { int codePoint = string.codePointAt(i); String name = getGlyphList().codePointToName(codePoint); width += cffFont.getType1CharString(name).getWidth(); } return width; }
@Override public Type1CharString getType1CharString(String name) throws IOException { return CFFType1Font.this.getType1CharString(name); } }
@Override public Type1CharString getType1CharString(String name) throws IOException { return CFFType1Font.this.getType1CharString(name); } }
@Override public float getWidth(String name) throws IOException { return getType1CharString(name).getWidth(); }
@Override public GeneralPath getPath(String name) throws IOException { return getType1CharString(name).getPath(); }
@Override public GeneralPath getPath(String name) throws IOException { return getType1CharString(name).getPath(); }
@Override public float getWidth(String name) throws IOException { return getType1CharString(name).getWidth(); }
@Override public float getHeight(int code) throws IOException { String name = codeToName(code); float height = 0; if (!glyphHeights.containsKey(name)) { height = (float)cffFont.getType1CharString(name).getBounds().getHeight(); // todo: cffFont could be null glyphHeights.put(name, height); } return height; }
@Override public float getHeight(int code) throws IOException { String name = codeToName(code); float height = 0; if (!glyphHeights.containsKey(name)) { height = (float)cffFont.getType1CharString(name).getBounds().getHeight(); // todo: cffFont could be null glyphHeights.put(name, height); } return height; }
@Override public float getStringWidth(String string) throws IOException { float width = 0; for (int i = 0; i < string.length(); i++) { int codePoint = string.codePointAt(i); String name = getGlyphList().codePointToName(codePoint); width += cffFont.getType1CharString(name).getWidth(); } return width; }
@Override public float getStringWidth(String string) throws IOException { float width = 0; for (int i = 0; i < string.length(); i++) { int codePoint = string.codePointAt(i); String name = getGlyphList().codePointToName(codePoint); width += cffFont.getType1CharString(name).getWidth(); } return width; }
for (int gid : gids.keySet()) { String mapping = font.getCharset().getNameForGID(gid); byte[] type1Bytes = formatter.format(font.getType1CharString(mapping).getType1Sequence()); byte[] charstringBytes = Type1FontUtil.charstringEncrypt(type1Bytes, 4); output.print("/" + mapping + " " + charstringBytes.length + " RD ");