Package de.intarsys.cwt.font
Class FontFamily
- java.lang.Object
-
- de.intarsys.cwt.font.FontFamily
-
- All Implemented Interfaces:
IFontFamily
public class FontFamily extends java.lang.Object implements IFontFamily
An abstraction of a fonts family.
-
-
Constructor Summary
Constructors Constructor Description FontFamily(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getFamilyName()
for exampleIFont
getFont(FontStyle style)
java.util.Iterator<IFont>
getFontIterator()
IFont[]
getFonts()
AllIFont
instances within this family.FontStyle[]
getFontStyles()
The supportedFontStyle
instances in this family.java.lang.String
getFontType()
The font type.void
registerFont(IFont font)
Add a newIFont
to this family.
-
-
-
Method Detail
-
getFamilyName
public java.lang.String getFamilyName()
Description copied from interface:IFontFamily
for example- Specified by:
getFamilyName
in interfaceIFontFamily
- Returns:
- for example
-
getFont
public IFont getFont(FontStyle style)
Description copied from interface:IFontFamily
- Specified by:
getFont
in interfaceIFontFamily
- Parameters:
style
- The requested style.- Returns:
- The
IFont
within the family with a specificFontStyle
or null.
-
getFontIterator
public java.util.Iterator<IFont> getFontIterator()
-
getFonts
public IFont[] getFonts()
Description copied from interface:IFontFamily
AllIFont
instances within this family.- Specified by:
getFonts
in interfaceIFontFamily
- Returns:
- All
IFont
instances within this family.
-
getFontStyles
public FontStyle[] getFontStyles()
Description copied from interface:IFontFamily
The supportedFontStyle
instances in this family.- Specified by:
getFontStyles
in interfaceIFontFamily
- Returns:
- The supported
FontStyle
instances in this family.
-
getFontType
public java.lang.String getFontType()
Description copied from interface:IFontFamily
The font type. This is for example "TrueType" or "Type1".- Specified by:
getFontType
in interfaceIFontFamily
- Returns:
- The font type.
-
registerFont
public void registerFont(IFont font)
Description copied from interface:IFontFamily
Add a newIFont
to this family.- Specified by:
registerFont
in interfaceIFontFamily
- Parameters:
font
- The newIFont
-
-