private static int[] readIndexDataOffsets(CFFDataInput input) throws IOException { int count = input.readCard16(); if (count == 0) { return null; } int offSize = input.readOffSize(); int[] offsets = new int[count+1]; for (int i = 0; i <= count; i++) { int offset = input.readOffset(offSize); if (offset > input.length()) { throw new IOException("illegal offset value " + offset + " in CFF font"); } offsets[i] = offset; } return offsets; }
private static Header readHeader(CFFDataInput input) throws IOException { Header cffHeader = new Header(); cffHeader.major = input.readCard8(); cffHeader.minor = input.readCard8(); cffHeader.hdrSize = input.readCard8(); cffHeader.offSize = input.readOffSize(); return cffHeader; }
private static int[] readIndexDataOffsets(CFFDataInput input) throws IOException { int count = input.readCard16(); if (count == 0) { return null; } int offSize = input.readOffSize(); int[] offsets = new int[count+1]; for (int i = 0; i <= count; i++) { int offset = input.readOffset(offSize); if (offset > input.length()) { throw new IOException("illegal offset value " + offset + " in CFF font"); } offsets[i] = offset; } return offsets; }
private static int[] readIndexDataOffsets(CFFDataInput input) throws IOException { int count = input.readCard16(); if (count == 0) { return null; } int offSize = input.readOffSize(); int[] offsets = new int[count+1]; for (int i = 0; i <= count; i++) { int offset = input.readOffset(offSize); if (offset > input.length()) { throw new IOException("illegal offset value " + offset + " in CFF font"); } offsets[i] = offset; } return offsets; }
private static Header readHeader(CFFDataInput input) throws IOException { Header cffHeader = new Header(); cffHeader.major = input.readCard8(); cffHeader.minor = input.readCard8(); cffHeader.hdrSize = input.readCard8(); cffHeader.offSize = input.readOffSize(); return cffHeader; }
private static Header readHeader(CFFDataInput input) throws IOException { Header cffHeader = new Header(); cffHeader.major = input.readCard8(); cffHeader.minor = input.readCard8(); cffHeader.hdrSize = input.readCard8(); cffHeader.offSize = input.readOffSize(); return cffHeader; }
setOffSize(cffData.readOffSize()); int[] offsets = new int[getNumObjects() + 1]; byte[] bytes;