private Type2CharString getType2CharString(int gid, String name) throws IOException { Type2CharString type2 = charStringCache.get(gid); if (type2 == null) { byte[] bytes = null; if (gid < charStrings.length) { bytes = charStrings[gid]; } if (bytes == null) { // .notdef bytes = charStrings[0]; } Type2CharStringParser parser = new Type2CharStringParser(fontName, name); List<Object> type2seq = parser.parse(bytes, globalSubrIndex, getLocalSubrIndex()); type2 = new Type2CharString(reader, fontName, name, gid, type2seq, getDefaultWidthX(), getNominalWidthX()); charStringCache.put(gid, type2); } return type2; }
private Type2CharString getType2CharString(int gid, String name) throws IOException { Type2CharString type2 = charStringCache.get(gid); if (type2 == null) { byte[] bytes = null; if (gid < charStrings.length) { bytes = charStrings[gid]; } if (bytes == null) { // .notdef bytes = charStrings[0]; } Type2CharStringParser parser = new Type2CharStringParser(fontName, name); List<Object> type2seq = parser.parse(bytes, globalSubrIndex, getLocalSubrIndex()); type2 = new Type2CharString(reader, fontName, name, gid, type2seq, getDefaultWidthX(), getNominalWidthX()); charStringCache.put(gid, type2); } return type2; }
private Type2CharString getType2CharString(int gid, String name) throws IOException { Type2CharString type2 = charStringCache.get(gid); if (type2 == null) { byte[] bytes = null; if (gid < charStrings.length) { bytes = charStrings[gid]; } if (bytes == null) { // .notdef bytes = charStrings[0]; } Type2CharStringParser parser = new Type2CharStringParser(fontName, name); List<Object> type2seq = parser.parse(bytes, globalSubrIndex, getLocalSubrIndex()); type2 = new Type2CharString(reader, fontName, name, gid, type2seq, getDefaultWidthX(), getNominalWidthX()); charStringCache.put(gid, type2); } return type2; }