/** * This will read the required data from the stream. * * @param ttf The font that is being read. * @param data The stream to read the data from. * @throws IOException If there is an error reading the data. */ @Override public void read(TrueTypeFont ttf, TTFDataStream data) throws IOException { @SuppressWarnings({"unused", "squid:S1854", "squid:S1481"}) int version = data.readUnsignedShort(); int numberOfTables = data.readUnsignedShort(); cmaps = new CmapSubtable[numberOfTables]; for (int i = 0; i < numberOfTables; i++) { CmapSubtable cmap = new CmapSubtable(); cmap.initData(data); cmaps[i] = cmap; } for (int i = 0; i < numberOfTables; i++) { cmaps[i].initSubtable(this, ttf.getNumberOfGlyphs(), data); } initialized = true; }
/** * This will read the required data from the stream. * * @param ttf The font that is being read. * @param data The stream to read the data from. * @throws IOException If there is an error reading the data. */ public void read(TrueTypeFont ttf, TTFDataStream data) throws IOException { int version = data.readUnsignedShort(); int numberOfTables = data.readUnsignedShort(); cmaps = new CmapSubtable[numberOfTables]; for (int i = 0; i < numberOfTables; i++) { CmapSubtable cmap = new CmapSubtable(); cmap.initData(data); cmaps[i] = cmap; } for (int i = 0; i < numberOfTables; i++) { cmaps[i].initSubtable(this, ttf.getNumberOfGlyphs(), data); } initialized = true; }
/** * This will read the required data from the stream. * * @param ttf The font that is being read. * @param data The stream to read the data from. * @throws IOException If there is an error reading the data. */ @Override public void read(TrueTypeFont ttf, TTFDataStream data) throws IOException { @SuppressWarnings({"unused", "squid:S1854", "squid:S1481"}) int version = data.readUnsignedShort(); int numberOfTables = data.readUnsignedShort(); cmaps = new CmapSubtable[numberOfTables]; for (int i = 0; i < numberOfTables; i++) { CmapSubtable cmap = new CmapSubtable(); cmap.initData(data); cmaps[i] = cmap; } for (int i = 0; i < numberOfTables; i++) { cmaps[i].initSubtable(this, ttf.getNumberOfGlyphs(), data); } initialized = true; }