org.foray.font.output
Class FontOutput4a

java.lang.Object
  extended by org.foray.font.output.FontOutput4a
All Implemented Interfaces:
org.axsl.font.output.FontOutput
Direct Known Subclasses:
FontPdf4a, FontPs4a

public abstract class FontOutput4a
extends Object
implements org.axsl.font.output.FontOutput

Abstract superclass for all FOray Font output helper classes.


Constructor Summary
FontOutput4a(FontUse4a fontUse)
          Constructor.
 
Method Summary
 char[] getCharsUsed()
          Return an array of all characters that should be embedded with the font when it is embedded.
 byte[] getContents()
           
 int getFirstIndex()
          Convenience method equivalent to getFontUse().getEncoding().getFirstIndex().
 FontConsumer4a getFontConsumer()
          Returns the related FontConsumer4a.
 org.axsl.font.FontUse getFontUse()
           
 Font4a getFOrayFont()
          Returns the related Font4a instance.
 FontUse4a getFOrayFontUse()
          Returns the FontUse, cast as a FontUse4a.
 FreeStandingFont getFreeStandingFont()
          Returns the related FreeStandingFont.
 int getLastIndex()
          Convenience method equivalent to getFontUse().getEncoding().getFirstIndex().
 org.apache.commons.logging.Log getLogger()
          Returns the logger.
 short[] getWidths()
          Returns an array containing the widths of all glyphs in the font that can be encoded by the FontUse instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FontOutput4a

public FontOutput4a(FontUse4a fontUse)
Constructor.

Parameters:
fontUse - The font use for which this output helper is created.
Method Detail

getFontUse

public org.axsl.font.FontUse getFontUse()
Specified by:
getFontUse in interface org.axsl.font.output.FontOutput

getFOrayFontUse

public FontUse4a getFOrayFontUse()
Returns the FontUse, cast as a FontUse4a.

Returns:
The font use, case as a FOrayFontUse.

getFOrayFont

public Font4a getFOrayFont()
Returns the related Font4a instance.

Returns:
The related Font4a instance.

getFreeStandingFont

public FreeStandingFont getFreeStandingFont()
Returns the related FreeStandingFont.

Returns:
The related FreeStandingFont.

getFontConsumer

public FontConsumer4a getFontConsumer()
Returns the related FontConsumer4a.

Returns:
The related FontConsumer4a.

getLogger

public org.apache.commons.logging.Log getLogger()
Returns the logger.

Returns:
The logger.

getContents

public byte[] getContents()
Specified by:
getContents in interface org.axsl.font.output.FontOutput

getCharsUsed

public char[] getCharsUsed()
Return an array of all characters that should be embedded with the font when it is embedded.

Returns:
An array whose elements are Unicode characters. In addition, each element index is equal to the font glyph index for the character at that index. In other words, the encoding matches the font's internal encoding. For fonts that have been subsetted, only the characters that are included in the subset are returned.

getWidths

public short[] getWidths()
Returns an array containing the widths of all glyphs in the font that can be encoded by the FontUse instance.

Returns:
An array whose elements are the widths of the glyphs that can be encoded by the FontUse instance. Element 0 contains the width for the first encodable glyph index (see Encoding.getFirstIndex()). The last element contains the width for the last encodable glyph index (see Encoding.getLastIndex()). Each element contains the width for the encodable glyph index that is equal to the element index + Encoding.getFirstIndex(). For fonts that have been subsetted, only the characters that are included in the subset are returned.
See Also:
FontPdf.getWidths()

getFirstIndex

public int getFirstIndex()
Convenience method equivalent to getFontUse().getEncoding().getFirstIndex(). This is the glyph index for the first item in the array returned by getWidths(). This is needed when embedding some types of fonts in a PDF file.

Returns:
The integer value of the first character code in this font.
See Also:
FontPdf.getFirstIndex()

getLastIndex

public int getLastIndex()
Convenience method equivalent to getFontUse().getEncoding().getFirstIndex(). This is the glyph index for the last item in the array returned by getWidths(). This is needed when embedding some types of fonts in a PDF file.

Returns:
The integer value of the last character code in this font.
See Also:
FontPdf.getLastIndex()


Copyright © 2017. All rights reserved.