org.foray.font.config
Class ConfiguredFont

java.lang.Object
  extended by org.foray.font.config.ConfiguredFont

public class ConfiguredFont
extends Object

Collector of information needed in order to register a font. Note that a font is first configured, then (possibly) later registered for use. This two-step process is useful in cases where the information is needed, but registration is deferred. The primary use case is for automatic font registration, where we may wish to parse some information from each font file. We may want to simply output a font-configuration file describing the content, or we may want to only read enough information to know the general characteristics of the font, without leaving the parser open.


Method Summary
protected  String getFamilyName()
          Returns the family name.
protected  String getFontUrl()
          Returns the URL of the font file.
 String getPostScriptName()
          Returns the PostScript name for the encapsulated font file.
protected  org.axsl.font.Font.Style getStyle()
          Returns the style of this font.
protected  org.axsl.font.Font.Weight getWeight()
          Returns the weight of this font.
 String invalidMessage()
          Returns null if this configured font is valid, or a message indicating why it is not valid.
protected  void setFamilyName(String familyName)
          Sets the family name.
protected  void setFontUrl(String fontUrl)
          Sets the URL of the font file.
protected  void setPostScriptName(String postScriptName)
          Sets the PostScript name for this font.
protected  void setStyle(org.axsl.font.Font.Style style)
          Returns the style of this font.
protected  void setWeight(org.axsl.font.Font.Weight weight)
          Sets the weight of this font.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

invalidMessage

public String invalidMessage()
Returns null if this configured font is valid, or a message indicating why it is not valid.

Returns:
A message indicating why this configured font is not valid, or null if it is valid.

getPostScriptName

public String getPostScriptName()
Returns the PostScript name for the encapsulated font file.

Returns:
The PostScript name.

setPostScriptName

protected void setPostScriptName(String postScriptName)
Sets the PostScript name for this font.

Parameters:
postScriptName - The new postScriptName.

getFamilyName

protected String getFamilyName()
Returns the family name.

Returns:
The family name.

setFamilyName

protected void setFamilyName(String familyName)
Sets the family name.

Parameters:
familyName - The new family name.

getFontUrl

protected String getFontUrl()
Returns the URL of the font file.

Returns:
The URL of the font file.

setFontUrl

protected void setFontUrl(String fontUrl)
Sets the URL of the font file.

Parameters:
fontUrl - The URL of the font file.

getWeight

protected org.axsl.font.Font.Weight getWeight()
Returns the weight of this font.

Returns:
The weight of this font.

setWeight

protected void setWeight(org.axsl.font.Font.Weight weight)
Sets the weight of this font.

Parameters:
weight - The new weight.

getStyle

protected org.axsl.font.Font.Style getStyle()
Returns the style of this font.

Returns:
The style of this font.

setStyle

protected void setStyle(org.axsl.font.Font.Style style)
Returns the style of this font.

Parameters:
style - The new style.


Copyright © 2017. All rights reserved.