private Format0Encoding readFormat0Encoding(CFFDataInput dataInput, CFFCharset charset, int format) throws IOException { Format0Encoding encoding = new Format0Encoding(); encoding.format = format; encoding.nCodes = dataInput.readCard8(); encoding.add(0, 0, ".notdef"); for (int gid = 1; gid <= encoding.nCodes; gid++) { int code = dataInput.readCard8(); int sid = charset.getSIDForGID(gid); encoding.add(code, sid, readString(sid)); } if ((format & 0x80) != 0) { readSupplement(dataInput, encoding); } return encoding; }
private Format1Encoding readFormat1Encoding(CFFDataInput dataInput, CFFCharset charset, int format) throws IOException { Format1Encoding encoding = new Format1Encoding(); encoding.format = format; encoding.nRanges = dataInput.readCard8(); encoding.add(0, 0, ".notdef"); int gid = 1; for (int i = 0; i < encoding.nRanges; i++) { int rangeFirst = dataInput.readCard8(); int rangeLeft = dataInput.readCard8(); for (int j = 0; j < 1 + rangeLeft; j++) { int sid = charset.getSIDForGID(gid); int code = rangeFirst + j; encoding.add(code, sid, readString(sid)); gid++; } } if ((format & 0x80) != 0) { readSupplement(dataInput, encoding); } return encoding; }
private Format0Encoding readFormat0Encoding(CFFDataInput dataInput, CFFCharset charset, int format) throws IOException { Format0Encoding encoding = new Format0Encoding(); encoding.format = format; encoding.nCodes = dataInput.readCard8(); encoding.add(0, 0, ".notdef"); for (int gid = 1; gid <= encoding.nCodes; gid++) { int code = dataInput.readCard8(); int sid = charset.getSIDForGID(gid); encoding.add(code, sid, readString(sid)); } if ((format & 0x80) != 0) { readSupplement(dataInput, encoding); } return encoding; }
private Format0Encoding readFormat0Encoding(CFFDataInput dataInput, CFFCharset charset, int format) throws IOException { Format0Encoding encoding = new Format0Encoding(); encoding.format = format; encoding.nCodes = dataInput.readCard8(); encoding.add(0, 0, ".notdef"); for (int gid = 1; gid <= encoding.nCodes; gid++) { int code = dataInput.readCard8(); int sid = charset.getSIDForGID(gid); encoding.add(code, sid, readString(sid)); } if ((format & 0x80) != 0) { readSupplement(dataInput, encoding); } return encoding; }
private Format1Encoding readFormat1Encoding(CFFDataInput dataInput, CFFCharset charset, int format) throws IOException { Format1Encoding encoding = new Format1Encoding(); encoding.format = format; encoding.nRanges = dataInput.readCard8(); encoding.add(0, 0, ".notdef"); int gid = 1; for (int i = 0; i < encoding.nRanges; i++) { int rangeFirst = dataInput.readCard8(); int rangeLeft = dataInput.readCard8(); for (int j = 0; j < 1 + rangeLeft; j++) { int sid = charset.getSIDForGID(gid); int code = rangeFirst + j; encoding.add(code, sid, readString(sid)); gid++; } } if ((format & 0x80) != 0) { readSupplement(dataInput, encoding); } return encoding; }
private Format1Encoding readFormat1Encoding(CFFDataInput dataInput, CFFCharset charset, int format) throws IOException { Format1Encoding encoding = new Format1Encoding(); encoding.format = format; encoding.nRanges = dataInput.readCard8(); encoding.add(0, 0, ".notdef"); int gid = 1; for (int i = 0; i < encoding.nRanges; i++) { int rangeFirst = dataInput.readCard8(); int rangeLeft = dataInput.readCard8(); for (int j = 0; j < 1 + rangeLeft; j++) { int sid = charset.getSIDForGID(gid); int code = rangeFirst + j; encoding.add(code, sid, readString(sid)); gid++; } } if ((format & 0x80) != 0) { readSupplement(dataInput, encoding); } return encoding; }