Class PSTTFGlyphOutputStream

  • All Implemented Interfaces:
    TTFGlyphOutputStream

    public class PSTTFGlyphOutputStream
    extends java.lang.Object
    implements TTFGlyphOutputStream
    Streams glyphs in accordance with the constraints of the PostScript file format. Mainly, PostScript strings have a limited capacity and the font data may have to be broken down into several strings; however, this must occur at well-defined places like table or glyph boundaries. See also Adobe Technical Note #5012, The Type 42 Font Format Specification.
    • Field Detail

      • byteCounter

        private int byteCounter
        Total number of bytes written so far.
      • lastStringBoundary

        private int lastStringBoundary
    • Constructor Detail

      • PSTTFGlyphOutputStream

        public PSTTFGlyphOutputStream​(PSTTFGenerator ttfGen)
        Constructor
        Parameters:
        ttfGen - PSTTFGenerator
    • Method Detail

      • streamGlyph

        public void streamGlyph​(byte[] glyphData,
                                int offset,
                                int size)
                         throws java.io.IOException
        Description copied from interface: TTFGlyphOutputStream
        Streams an individual glyph from the given byte array.
        Specified by:
        streamGlyph in interface TTFGlyphOutputStream
        Parameters:
        glyphData - the source of the glyph data to stream from
        offset - the position in the glyph data where the glyph starts
        size - the size of the glyph data in bytes
        Throws:
        java.io.IOException