@Override public float getWidth(String name) throws IOException { Integer gid = nameToGID(name); return getAdvanceWidth(gid); }
@Override public float getWidthFromFont(int code) throws IOException { int gid = codeToGID(code); float width = ttf.getAdvanceWidth(gid); float unitsPerEM = ttf.getUnitsPerEm(); if (Float.compare(unitsPerEM, 1000) != 0) { width *= 1000f / unitsPerEM; } return width; }
@Override public float getWidthFromFont(int code) throws IOException { int gid = codeToGID(code); int width = ttf.getAdvanceWidth(gid); int unitsPerEM = ttf.getUnitsPerEm(); if (unitsPerEM != 1000) { width *= 1000f / unitsPerEM; } return width; }
@Override public float getWidth(String name) throws IOException { Integer gid = nameToGID(name); return getAdvanceWidth(gid); }
@Override public float getWidth(String name) throws IOException { Integer gid = nameToGID(name); return getAdvanceWidth(gid); }
@Override public float getWidthFromFont(int code) throws IOException { int gid = codeToGID(code); float width = ttf.getAdvanceWidth(gid); float unitsPerEM = ttf.getUnitsPerEm(); if (unitsPerEM != 1000) { width *= 1000f / unitsPerEM; } return width; }
@Override public float getWidthFromFont(int code) throws IOException { int gid = codeToGID(code); int width = ttf.getAdvanceWidth(gid); int unitsPerEM = ttf.getUnitsPerEm(); if (unitsPerEM != 1000) { width *= 1000f / unitsPerEM; } return width; }
@Override public float getWidthFromFont(int code) throws IOException { int gid = codeToGID(code); float width = ttf.getAdvanceWidth(gid); float unitsPerEM = ttf.getUnitsPerEm(); if (unitsPerEM != 1000) { width *= 1000f / unitsPerEM; } return width; }
@Override public float getWidthFromFont(int code) throws IOException { int gid = codeToGID(code); int width = ttf.getAdvanceWidth(gid); int unitsPerEM = ttf.getUnitsPerEm(); if (unitsPerEM != 1000) { width *= 1000f / unitsPerEM; } return width; }