@Override public boolean hasGlyph(int code) throws IOException { return !getEncoding().getName(code).equals(".notdef"); }
@Override public GeneralPath getPath(int code) throws IOException { String name = getEncoding().getName(code); return getPath(name); }
public String codeToName(int code) throws IOException { String name = getEncoding().getName(code); return getNameInFont(name); }
@Override public GeneralPath getNormalizedPath(int code) throws IOException { String name = getEncoding().getName(code); GeneralPath path = getPath(name); if (path == null) { return getPath(".notdef"); } return path; }
@Override public float getHeight(int code) throws IOException { String name = codeToName(code); if (getStandard14AFM() != null) { String afmName = getEncoding().getName(code); return getStandard14AFM().getCharacterHeight(afmName); // todo: isn't this the y-advance, not the height? } else { // todo: should be scaled by font matrix return (float) genericFont.getPath(name).getBounds().getHeight(); } }
@Override public boolean hasGlyph(int code) throws IOException { return !getEncoding().getName(code).equals(".notdef"); }
public String codeToName(int code) throws IOException { String name = getEncoding().getName(code); return getNameInFont(name); }
@Override public GeneralPath getPath(int code) throws IOException { String name = getEncoding().getName(code); return getPath(name); }
public String codeToName(int code) throws IOException { String name = getEncoding().getName(code); return getNameInFont(name); }
@Override public GeneralPath getNormalizedPath(int code) throws IOException { String name = getEncoding().getName(code); GeneralPath path = getPath(name); if (path == null) { return getPath(".notdef"); } return path; }
@Override public float getHeight(int code) throws IOException { String name = codeToName(code); if (getStandard14AFM() != null) { String afmName = getEncoding().getName(code); return getStandard14AFM().getCharacterHeight(afmName); // todo: isn't this the y-advance, not the height? } else { // todo: should be scaled by font matrix return (float) genericFont.getPath(name).getBounds().getHeight(); } }
@Override public float getHeight(int code) throws IOException { String name = codeToName(code); if (getStandard14AFM() != null) { String afmName = getEncoding().getName(code); return getStandard14AFM().getCharacterHeight(afmName); // todo: isn't this the y-advance, not the height? } else { // todo: should be scaled by font matrix return (float) genericFont.getPath(name).getBounds().getHeight(); } }