/** * 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 { loca = ttf.getIndexToLocation(); numGlyphs = ttf.getNumberOfGlyphs(); if (numGlyphs < MAX_CACHE_SIZE) { // don't cache the huge fonts to save memory glyphs = new GlyphData[numGlyphs]; } // we don't actually read the complete table here because it can contain tens of thousands of glyphs this.data = data; initialized = true; }
long[] offsets = ttf.getIndexToLocation().getOffsets(); InputStream is = ttf.getOriginalData(); Set<Integer> glyphIdsToAdd = null;
long[] offsets = ttf.getIndexToLocation().getOffsets(); try (InputStream is = ttf.getOriginalData())
IndexToLocationTable loc = font.getIndexToLocation(); if (loc == null)
/** * 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 { loca = ttf.getIndexToLocation(); numGlyphs = ttf.getNumberOfGlyphs(); if (numGlyphs < MAX_CACHE_SIZE) { // don't cache the huge fonts to save memory glyphs = new GlyphData[numGlyphs]; } // we don't actually read the complete table here because it can contain tens of thousands of glyphs this.data = 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 { loca = ttf.getIndexToLocation(); numGlyphs = ttf.getNumberOfGlyphs(); if (numGlyphs < MAX_CACHE_SIZE) { // don't cache the huge fonts to save memory glyphs = new GlyphData[numGlyphs]; } // we don't actually read the complete table here because it can contain tens of thousands of glyphs this.data = data; initialized = true; }
long[] offsets = ttf.getIndexToLocation().getOffsets(); InputStream is = ttf.getOriginalData(); Set<Integer> glyphIdsToAdd = null;
long[] offsets = ttf.getIndexToLocation().getOffsets(); InputStream is = ttf.getOriginalData(); Set<Integer> glyphIdsToAdd = null;
long[] offsets = ttf.getIndexToLocation().getOffsets(); InputStream is = ttf.getOriginalData(); try
long[] offsets = ttf.getIndexToLocation().getOffsets(); try (InputStream is = ttf.getOriginalData())
IndexToLocationTable loc = font.getIndexToLocation(); if (loc == null)
IndexToLocationTable loc = font.getIndexToLocation(); if (loc == null)