Package de.intarsys.cwt.font
Class StandardFontRegistry
- java.lang.Object
-
- de.intarsys.cwt.font.StandardFontRegistry
-
- All Implemented Interfaces:
IFontRegistry
public class StandardFontRegistry extends java.lang.Object implements IFontRegistry
-
-
Constructor Summary
Constructors Constructor Description StandardFontRegistry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IFont
basicLookup(java.lang.String key, IFontQuery query)
protected boolean
basicMatchFamily(IFontQuery query, IFont font)
protected boolean
basicMatchFamilyStyle(IFontQuery query, IFont font)
protected void
basicRegister(java.lang.String key, IFont value)
IFontFamily[]
getFontFamilies()
IFont[]
getFonts()
TheIFont
instances in thisIFontRegistry
.protected java.lang.Object
getLookupKeyFontFamily(IFontQuery query)
protected java.lang.String
getLookupKeyFontName(IFontQuery query)
protected java.lang.String
getLookupKeyFontNameAsCanonical(IFontQuery query)
protected java.lang.String
getLookupKeyFontNameCanonical(IFontQuery query)
protected java.lang.String
getLookupKeyFontNamePostScript(IFontQuery query)
IFont
lookupFont(IFontQuery query)
TheIFont
selected by theIFontQuery
.IFontFamily
lookupFontFamily(IFontQuery query)
TheIFontFamily
selected by theIFontQuery
.void
registerFont(IFont font)
Add a newIFont
to theIFontRegistry
.protected java.lang.String
removeSpaces(java.lang.String name)
-
-
-
Method Detail
-
basicLookup
protected IFont basicLookup(java.lang.String key, IFontQuery query)
-
basicMatchFamily
protected boolean basicMatchFamily(IFontQuery query, IFont font)
-
basicMatchFamilyStyle
protected boolean basicMatchFamilyStyle(IFontQuery query, IFont font)
-
basicRegister
protected void basicRegister(java.lang.String key, IFont value)
-
getFontFamilies
public IFontFamily[] getFontFamilies()
Description copied from interface:IFontRegistry
- Specified by:
getFontFamilies
in interfaceIFontRegistry
- Returns:
- The
IFontFamily
instances formed by theIFont
instances in thisIFontRegistry
.
-
getFonts
public IFont[] getFonts()
Description copied from interface:IFontRegistry
TheIFont
instances in thisIFontRegistry
.- Specified by:
getFonts
in interfaceIFontRegistry
- Returns:
- The
IFont
instances in thisIFontRegistry
.
-
getLookupKeyFontFamily
protected java.lang.Object getLookupKeyFontFamily(IFontQuery query)
-
getLookupKeyFontName
protected java.lang.String getLookupKeyFontName(IFontQuery query)
-
getLookupKeyFontNameAsCanonical
protected java.lang.String getLookupKeyFontNameAsCanonical(IFontQuery query)
-
getLookupKeyFontNameCanonical
protected java.lang.String getLookupKeyFontNameCanonical(IFontQuery query)
-
getLookupKeyFontNamePostScript
protected java.lang.String getLookupKeyFontNamePostScript(IFontQuery query)
-
lookupFont
public IFont lookupFont(IFontQuery query)
Description copied from interface:IFontRegistry
TheIFont
selected by theIFontQuery
.- Specified by:
lookupFont
in interfaceIFontRegistry
- Parameters:
query
- AIFontQuery
describing a singleIFont
.- Returns:
- The
IFont
selected by theIFontQuery
.
-
lookupFontFamily
public IFontFamily lookupFontFamily(IFontQuery query)
Description copied from interface:IFontRegistry
TheIFontFamily
selected by theIFontQuery
.- Specified by:
lookupFontFamily
in interfaceIFontRegistry
- Parameters:
query
- AIFontQuery
describing a singleIFontFamily
.- Returns:
- The
IFontFamily
selected by theIFontQuery
.
-
registerFont
public void registerFont(IFont font)
Description copied from interface:IFontRegistry
Add a newIFont
to theIFontRegistry
.- Specified by:
registerFont
in interfaceIFontRegistry
- Parameters:
font
- The newIFont
-
removeSpaces
protected java.lang.String removeSpaces(java.lang.String name)
-
-