Class VerticalOriginTable


  • public class VerticalOriginTable
    extends TTFTable
    A vertical origin 'VORG' table in an OpenType font. The purpose of this table is to improve the efficiency of determining vertical origins in CFF fonts where absent this information the bounding box would have to be extracted from CFF charstring data. This table is strongly recommended by the OpenType CJK Font Guidelines for "CFF OpenType fonts that are used for vertical writing". This table is specified only in the OpenType specification (1.3 and later).
    • Method Detail

      • read

        public void read​(TrueTypeFont ttf,
                         com.tom_roush.fontbox.ttf.TTFDataStream data)
                  throws IOException
        This will read the required data from the stream.
        Parameters:
        ttf - The font that is being read.
        data - The stream to read the data from.
        Throws:
        IOException - If there is an error reading the data.
      • getVersion

        public float getVersion()
        Returns:
        Returns the version.
      • getOriginY

        public int getOriginY​(int gid)
        Returns the y-coordinate of the vertical origin for the given GID if known, or returns the default value if not specified in table data.
        Parameters:
        gid - GID
        Returns:
        Returns the y-coordinate of the vertical origin.