|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.foray.font.config.RegisteredFontFamily
public class RegisteredFontFamily
Class representing a font family that has been registered for use with FOray. This currently is just a collection of the fonts that are in this family. The actual font characteristics used in font resolution should be stored in the RegisteredFont itself.
| Constructor Summary | |
|---|---|
RegisteredFontFamily(FontServer4a fontServer,
String name)
Constructor. |
|
| Method Summary | |
|---|---|
static float |
convertPercent(String inputString,
float defaultValue)
Converts a String representing a percentage to its decimal value. |
RegisteredFontDesc |
findRegisteredFontDesc(org.axsl.font.Font.Style style,
org.axsl.font.Font.Weight weight,
org.axsl.font.Font.Variant variant,
org.axsl.font.Font.Stretch stretch,
boolean freeStandingFonts,
boolean systemFonts)
This method encapsulates the "per-descriptor matching rules" described in the CSS 2 documentation at Section 15.5. |
List<RegisteredFontDesc> |
getFontDescriptions()
Returns the list of RegisteredFontDesc instances that are
associated with this family. |
FontServer4a |
getFontServer()
Return the related font server. |
String |
getName()
Returns the name of this font family. |
RegisteredFontDesc |
nextBolderFont(RegisteredFontDesc baseline)
Returns the next bolder font. |
RegisteredFontDesc |
nextLighterFont(RegisteredFontDesc baseline)
Returns the next lighter font. |
void |
registerFontDesc(RegisteredFont registeredFont,
org.axsl.ps.Encoding encoding,
org.axsl.font.Font.Style style,
org.axsl.font.Font.Weight weight,
org.axsl.font.Font.Variant variant,
org.axsl.font.Font.Stretch stretch,
float simulatedSmallCaps,
float simulatedOblique,
float simulatedBackslant,
float[] simulatedStretch)
Maps a font-description to a RegisteredFont for this font-family. |
void |
registerFontDesc(RegisteredFont registeredFont,
org.axsl.ps.Encoding encoding,
String style,
String weight,
String variant,
String stretch,
String simulatedSmallCaps,
String simulatedOblique,
String simulatedBackslant,
String[] simulatedStretch)
Maps a font-description to a RegisteredFont for this font-family. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RegisteredFontFamily(FontServer4a fontServer,
String name)
fontServer - The parent font server.name - The name of this font family (e.g. "Courier").| Method Detail |
|---|
public String getName()
public void registerFontDesc(RegisteredFont registeredFont,
org.axsl.ps.Encoding encoding,
String style,
String weight,
String variant,
String stretch,
String simulatedSmallCaps,
String simulatedOblique,
String simulatedBackslant,
String[] simulatedStretch)
throws org.axsl.font.FontException
registeredFont - the RegisteredFont that should be supplied when
a font matching this description is requested.encoding - The encoding for the font description.style - The style (normal, italic, etc.).weight - The weight (normal, bold, 100, etc.).variant - The variant (normal, small-caps).stretch - The stretch (normal, condensed, etc.).simulatedSmallCaps - A percentage.simulatedOblique - A number of degrees.simulatedBackslant - A number of degrees.simulatedStretch - A percentage.
org.axsl.font.FontException - For error in registration.
public void registerFontDesc(RegisteredFont registeredFont,
org.axsl.ps.Encoding encoding,
org.axsl.font.Font.Style style,
org.axsl.font.Font.Weight weight,
org.axsl.font.Font.Variant variant,
org.axsl.font.Font.Stretch stretch,
float simulatedSmallCaps,
float simulatedOblique,
float simulatedBackslant,
float[] simulatedStretch)
throws org.axsl.font.FontException
registeredFont - the RegisteredFont that should be supplied when
a font matching this description is requested.encoding - The encoding for the font description.style - The style (normal, italic, etc.).weight - The weight (normal, bold, 100, etc.).variant - The variant (normal, small-caps).stretch - The stretch (normal, condensed, etc.).simulatedSmallCaps - A percentage.simulatedOblique - A number of degrees.simulatedBackslant - A number of degrees.simulatedStretch - A percentage.
org.axsl.font.FontException - For error in registration.
public RegisteredFontDesc findRegisteredFontDesc(org.axsl.font.Font.Style style,
org.axsl.font.Font.Weight weight,
org.axsl.font.Font.Variant variant,
org.axsl.font.Font.Stretch stretch,
boolean freeStandingFonts,
boolean systemFonts)
style - The font-style constant requested.weight - The font-weight constant requested.variant - The font-variant constant requested.stretch - The font-stretch constant requested.freeStandingFonts - Indicates whether free-standing fonts can be
considered in this selection.systemFonts - Indicates whether system fonts can be considered in
this selection.
public FontServer4a getFontServer()
public RegisteredFontDesc nextBolderFont(RegisteredFontDesc baseline)
baseline - The baseline font for which a bolder version should be
found.
public RegisteredFontDesc nextLighterFont(RegisteredFontDesc baseline)
baseline - The baseline font for which a lighter version should be
found.
public static float convertPercent(String inputString,
float defaultValue)
inputString - A String representing a percentage. It must end with
the "%" symbol.defaultValue - The value to be returned if the parse is unsuccessful.
defaultValue if the input is
not valid. An input value of "98%" will return 98.0.public List<RegisteredFontDesc> getFontDescriptions()
RegisteredFontDesc instances that are
associated with this family.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||