public RandomAccessFileOrArray getSafeFile() { return file.createView(); }
public RandomAccessFileOrArray getSafeFile() { return file.createView(); }
public byte[] getSubset(Set<Integer> glyphs, boolean subset) throws java.io.IOException { TrueTypeFontSubset sb = new TrueTypeFontSubset(fileName, raf.createView(), glyphs, directoryOffset, true, !subset); return sb.process(); }
public byte[] getSubset(Set<Integer> glyphs, boolean subset) throws java.io.IOException { TrueTypeFontSubset sb = new TrueTypeFontSubset(fileName, raf.createView(), glyphs, directoryOffset, true, !subset); return sb.process(); }
public byte[] getFullFont() throws java.io.IOException { RandomAccessFileOrArray rf2 = null; try { rf2 = raf.createView(); byte[] b = new byte[(int) rf2.length()]; rf2.readFully(b); return b; } finally { try { if (rf2 != null) { rf2.close(); } } catch (Exception ignored) { } } }
public byte[] getFullFont() throws java.io.IOException { RandomAccessFileOrArray rf2 = null; try { rf2 = raf.createView(); byte[] b = new byte[(int) rf2.length()]; rf2.readFully(b); return b; } finally { try { if (rf2 != null) { rf2.close(); } } catch (Exception ignored) { } } }
/** * If this font file is using the Compact Font File Format, then this method * will return the raw bytes needed for the font stream. If this method is * ever made public: make sure to add a test if (cff == true). * * @return a byte array */ public byte[] readCffFont() throws java.io.IOException { if (!isCff()) { return null; } RandomAccessFileOrArray rf2 = null; try { rf2 = raf.createView(); rf2.seek(cffOffset); byte[] cff = new byte[cffLength]; rf2.readFully(cff); return cff; } finally { try { if (rf2 != null) { rf2.close(); } } catch (Exception ignored) { } } }
/** * If this font file is using the Compact Font File Format, then this method * will return the raw bytes needed for the font stream. If this method is * ever made public: make sure to add a test if (cff == true). * * @return a byte array */ public byte[] readCffFont() throws java.io.IOException { if (!isCff()) { return null; } RandomAccessFileOrArray rf2 = null; try { rf2 = raf.createView(); rf2.seek(cffOffset); byte[] cff = new byte[cffLength]; rf2.readFully(cff); return cff; } finally { try { if (rf2 != null) { rf2.close(); } } catch (Exception ignored) { } } }