com.sun.pdfview.font.ttf

Class 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
booleanargsAreWords(int index)
Determine whether args 1 and 2 are words or bytes
booleanargsAreXYValues(int index)
Determine whether args 1 and 2 are xy values or point indices
intgetComponentPoint(int index)
Get the point in the component glyph to match
intgetCompoundPoint(int index)
Get the point in the compound glyph to match
shortgetFlag(int index)
Get a given flag
shortgetGlyphIndex(int index)
Get the glyf index for a given glyf
bytegetInstruction(int index)
Get a given instruction
intgetNumComponents()
Get the number of components in this compound
shortgetNumInstructions()
Get the number of instructions
double[]getTransform(int index)
Get the base affine transform.
booleanhasAScale(int index)
Determine whether there is a simple scale
protected booleanhasInstructions(int index)
Determine whether there are instructions
protected booleanhasTwoByTwo(int index)
Determine whether there is a 2x2 transform
protected booleanhasXYScale(int index)
Determine whether there are separate scales on X and Y
protected booleanmoreComponents(int index)
Determine whether there are more components left to read
booleanoverlapCompound(int index)
This component overlaps the existing compound
booleanroundXYToGrid(int index)
Determine whether to round XY values to the grid
protected voidsetInstructions(byte[] instructions)
Set the instructions
booleanuseMetrics(int index)
Use the metrics of this component for the compound

Constructor Detail

GlyfCompound

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

Method Detail

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

getComponentPoint

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

getCompoundPoint

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

getFlag

public short getFlag(int index)
Get a given flag

getGlyphIndex

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

getInstruction

public byte getInstruction(int index)
Get a given instruction

getNumComponents

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

getNumInstructions

public short getNumInstructions()
Get the number of instructions

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.

hasAScale

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

hasInstructions

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

hasTwoByTwo

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

hasXYScale

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

moreComponents

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

overlapCompound

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

roundXYToGrid

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

setInstructions

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

useMetrics

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