org.foray.font
Class ConsumerFont4a

java.lang.Object
  extended by org.foray.font.ConsumerFont4a

public class ConsumerFont4a
extends Object

A ConsumerFont represents a Font as used by a specific FontConsumer. The key fields are therefore a Font and a FontConsumer. The main responsibilities of this class are:


Constructor Summary
ConsumerFont4a(Font4a font, FontConsumer4a consumer)
          Constructor.
 
Method Summary
 org.axsl.ps.Encoding findEncoding(RegisteredFontDesc rfd, int codePoint)
          Find the encoding that should be used for the seletion of a font use.
 FontConsumer4a getFontConsumer()
          Return the parent font consumer.
 FontUse4a getFontUse(RegisteredFontDesc rfd, org.axsl.ps.Encoding encoding)
          Returns the described FontUse instance, creating it if necessary.
 List<FontUse4a> getFontUses()
          Return the collection of child font uses.
 Font4a getFOrayFont()
          Returns the parent font.
 FontServer4a getFOrayFontServer()
          Return the font server.
 FreeStandingFont getFreeStandingFont()
          Returns the font cast as a free-standing font.
 org.apache.commons.logging.Log getLogger()
          Return the logger.
 Subset getSubset()
          Return the subset information for this font.
 SystemFont getSystemFont()
          Returns the font cast as a system font.
protected  void optimize()
          Optimize the information about this font in preparation for output.
 FontUse4a selectFontUse(RegisteredFontDesc rfd, int codePoint)
          Select a font use based on the registered font description and a Unicode code point.
 boolean subSetting()
          Indicates whether this font is being subsetted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsumerFont4a

public ConsumerFont4a(Font4a font,
                      FontConsumer4a consumer)
Constructor.

Parameters:
font - The parent font.
consumer - The parent font consumer.
Method Detail

getFOrayFont

public Font4a getFOrayFont()
Returns the parent font.

Returns:
The font.

getFreeStandingFont

public FreeStandingFont getFreeStandingFont()
Returns the font cast as a free-standing font.

Returns:
The font cast as a free-standing font if it is one, or null otherwise.

getSystemFont

public SystemFont getSystemFont()
Returns the font cast as a system font.

Returns:
The font cast as a system font if it is one, or null otherwise.

getFontConsumer

public FontConsumer4a getFontConsumer()
Return the parent font consumer.

Returns:
The font consumer.

getSubset

public Subset getSubset()
Return the subset information for this font.

Returns:
The subset.

subSetting

public boolean subSetting()
Indicates whether this font is being subsetted.

Returns:
True iff this font is being subsetted.

getLogger

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

Returns:
The logger.

getFOrayFontServer

public FontServer4a getFOrayFontServer()
Return the font server.

Returns:
The font server.

optimize

protected void optimize()
Optimize the information about this font in preparation for output.


getFontUses

public List<FontUse4a> getFontUses()
Return the collection of child font uses.

Returns:
The child font uses.

selectFontUse

public FontUse4a selectFontUse(RegisteredFontDesc rfd,
                               int codePoint)
Select a font use based on the registered font description and a Unicode code point.

Parameters:
rfd - The font description that should be used for the selection.
codePoint - The Unicode code point that should be encodable by the returned font use.
Returns:
The best font use.

getFontUse

public FontUse4a getFontUse(RegisteredFontDesc rfd,
                            org.axsl.ps.Encoding encoding)
Returns the described FontUse instance, creating it if necessary.

Parameters:
rfd - The description for which the font use should be retrieved or created.
encoding - The encoding for which the font use should be retrieved or created.
Returns:
The selected or created font use.

findEncoding

public org.axsl.ps.Encoding findEncoding(RegisteredFontDesc rfd,
                                         int codePoint)
Find the encoding that should be used for the seletion of a font use.

Parameters:
rfd - The font description.
codePoint - The Unicode code point.
Returns:
The appropriate encoding.


Copyright © 2017. All rights reserved.