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.StringgetFamilyName()for exampleIFontgetFont(FontStyle style)java.util.Iterator<IFont>getFontIterator()IFont[]getFonts()AllIFontinstances within this family.FontStyle[]getFontStyles()The supportedFontStyleinstances in this family.java.lang.StringgetFontType()The font type.voidregisterFont(IFont font)Add a newIFontto this family.
-
-
-
Method Detail
-
getFamilyName
public java.lang.String getFamilyName()
Description copied from interface:IFontFamilyfor example- Specified by:
getFamilyNamein interfaceIFontFamily- Returns:
- for example
-
getFont
public IFont getFont(FontStyle style)
Description copied from interface:IFontFamily- Specified by:
getFontin interfaceIFontFamily- Parameters:
style- The requested style.- Returns:
- The
IFontwithin the family with a specificFontStyleor null.
-
getFontIterator
public java.util.Iterator<IFont> getFontIterator()
-
getFonts
public IFont[] getFonts()
Description copied from interface:IFontFamilyAllIFontinstances within this family.- Specified by:
getFontsin interfaceIFontFamily- Returns:
- All
IFontinstances within this family.
-
getFontStyles
public FontStyle[] getFontStyles()
Description copied from interface:IFontFamilyThe supportedFontStyleinstances in this family.- Specified by:
getFontStylesin interfaceIFontFamily- Returns:
- The supported
FontStyleinstances in this family.
-
getFontType
public java.lang.String getFontType()
Description copied from interface:IFontFamilyThe font type. This is for example "TrueType" or "Type1".- Specified by:
getFontTypein interfaceIFontFamily- Returns:
- The font type.
-
registerFont
public void registerFont(IFont font)
Description copied from interface:IFontFamilyAdd a newIFontto this family.- Specified by:
registerFontin interfaceIFontFamily- Parameters:
font- The newIFont
-
-