com.sun.pdfview.font.ttf
Class GlyfCompound

java.lang.Object
  extended by com.sun.pdfview.font.ttf.Glyf
      extended by com.sun.pdfview.font.ttf.GlyfCompound

public class GlyfCompound
extends Glyf

A single simple glyph in a pdf font.


Constructor Summary
protected GlyfCompound()
          Creates a new instance of a simple glyf
 
Method Summary
 boolean argsAreWords(int index)
          Determine whether args 1 and 2 are words or bytes
 boolean argsAreXYValues(int index)
          Determine whether args 1 and 2 are xy values or point indices
 int getComponentPoint(int index)
          Get the point in the component glyph to match
 int getCompoundPoint(int index)
          Get the point in the compound glyph to match
 java.nio.ByteBuffer getData()
          Get the data in this glyf as a byte buffer.
 short getFlag(int index)
          Get a given flag
 short getGlyphIndex(int index)
          Get the glyf index for a given glyf
 byte getInstruction(int index)
          Get a given instruction
 short getLength()
          Get the length of this glyf.
 int getNumComponents()
          Get the number of components in this compound
 short getNumInstructions()
          Get the number of instructions
 double[] getTransform(int index)
          Get the base affine transform.
 boolean hasAScale(int index)
          Determine whether there is a simple scale
protected  boolean hasInstructions(int index)
          Determine whether there are instructions
protected  boolean hasTwoByTwo(int index)
          Determine whether there is a 2x2 transform
protected  boolean hasXYScale(int index)
          Determine whether there are separate scales on X and Y
protected  boolean moreComponents(int index)
          Determine whether there are more components left to read
 boolean overlapCompound(int index)
          This component overlaps the existing compound
 boolean roundXYToGrid(int index)
          Determine whether to round XY values to the grid
 void setData(java.nio.ByteBuffer data)
          Set the data for this glyf.
protected  void setInstructions(byte[] instructions)
          Set the instructions
 boolean useMetrics(int index)
          Use the metrics of this component for the compound
 
Methods inherited from class com.sun.pdfview.font.ttf.Glyf
getGlyf, getMaxX, getMaxY, getMinX, getMinY, getNumContours, isCompound, setCompound, setMaxX, setMaxY, setMinX, setMinY, setNumContours
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlyfCompound

protected GlyfCompound()
Creates a new instance of a simple glyf

Method Detail

setData

public void setData(java.nio.ByteBuffer data)
Set the data for this glyf.

Overrides:
setData in class Glyf

getData

public java.nio.ByteBuffer getData()
Get the data in this glyf as a byte buffer. Not implemented.

Overrides:
getData in class Glyf

getLength

public short getLength()
Get the length of this glyf. Not implemented.

Overrides:
getLength in class Glyf

getNumComponents

public int getNumComponents()
Get the number of components in this compound


getFlag

public short getFlag(int index)
Get a given flag


getGlyphIndex

public short getGlyphIndex(int index)
Get the glyf index for a given glyf


getTransform

public double[] getTransform(int index)
Get the base affine transform. This is based on a whacy formula defined in the true type font spec.


getCompoundPoint

public int getCompoundPoint(int index)
Get the point in the compound glyph to match


getComponentPoint

public int getComponentPoint(int index)
Get the point in the component glyph to match


argsAreWords

public boolean argsAreWords(int index)
Determine whether args 1 and 2 are words or bytes


argsAreXYValues

public boolean argsAreXYValues(int index)
Determine whether args 1 and 2 are xy values or point indices


roundXYToGrid

public boolean roundXYToGrid(int index)
Determine whether to round XY values to the grid


hasAScale

public boolean hasAScale(int index)
Determine whether there is a simple scale


moreComponents

protected boolean moreComponents(int index)
Determine whether there are more components left to read


hasXYScale

protected boolean hasXYScale(int index)
Determine whether there are separate scales on X and Y


hasTwoByTwo

protected boolean hasTwoByTwo(int index)
Determine whether there is a 2x2 transform


hasInstructions

protected boolean hasInstructions(int index)
Determine whether there are instructions


useMetrics

public boolean useMetrics(int index)
Use the metrics of this component for the compound


overlapCompound

public boolean overlapCompound(int index)
This component overlaps the existing compound


getNumInstructions

public short getNumInstructions()
Get the number of instructions


getInstruction

public byte getInstruction(int index)
Get a given instruction


setInstructions

protected void setInstructions(byte[] instructions)
Set the instructions