Interface FontFactory
-
- All Known Subinterfaces:
AnnotationFontFactory,LoggingFontFactory,SwingAnnotationFontFactory
- All Known Implementing Classes:
AbstractFontFactory,ActivateLoggingFontFactory,AnnotationBasicFontFactory,AnnotationLogicalFontFactory,AnnotationProfileLogicalFontFactory,AnnotationProfileStandard14FontFactory,AnnotationProfileSystemFontFactory,AnnotationStandard14FontFactory,AnnotationSystemFontFactory,AnnotationWellKnownNameFontFactory,BasicFontFactory,CaseInsensitiveNameFontFactory,ChainedAnnotationFontFactory,ChainedFontFactory,ChainedSwingAnnotationFontFactory,DelegateLoggingFontFactory,FamilyNameFontFactory,FontNameFontFactory,FontsPropertiesFontFactory,FuzzyPostscriptNameFontFactory,FuzzyStandard14FontFactory,FuzzyStyleFontFactory,LiberalStandard14FontFactory,LogicalFontFactory,NameFontFactory,PostScriptNameFontFactory,Standard14FontFactory,StyleFontFactory,SwingAnnotationBasicFontFactory,SwingAnnotationGenericStylesSystemFontFactory,SwingAnnotationLogicalFontFactory,SwingAnnotationProfileBasicFontFactory,SwingAnnotationProfileGenericStylesSystemFontFactory,SwingAnnotationProfileLogicalFontFactory,SwingAnnotationProfileStandard14FontFactory,SwingAnnotationProfileSystemFontFactory,SwingAnnotationStandard14FontFactory,SwingAnnotationSystemFontFactory,SwingAnnotationWellKnownNameFontFactory,WellKnownNameFontFactory
public interface FontFactoryInstances supplyFonts upon request. Implementations must be Thread-safe and prepared to handle lots of calls from various Threads concurrently.Implementation note: Since instances are often used in time-critical environments, implementations must be quick to return an applicable font. For example, the FontFactory used for loading and displaying documents must be quick to respond. Otherwise users might perceive document display to be slow. Depending on specific documents in use, there are also cases where the FontFactory will be called oftentimes, even with identical parameters.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Fontcreate(FontAttributeSet fontAttributeSet, Map<String,Object> scope)Supply aFontwhich fits well for the requested parameters.
-
-
-
Method Detail
-
create
Font create(FontAttributeSet fontAttributeSet, Map<String,Object> scope)
Supply aFontwhich fits well for the requested parameters. Care should be taken to provide a fast implementation. This method might be called frequently and from various Threads at the same time. Blocking should be avoided.- Parameters:
fontAttributeSet- TheAttributes the requested font should have. Characteristics like its name or styles.scope- Information about this request's scope. This could encompass things like its intent, target, purpose or source.- Returns:
- a
Fontdeemed appropriate, ornullif no suchFontis available. Some implementations might be able to return aFontwhich fits all requested characteristics. Others might have several to choose from or none at all. TheFontwhich is returned doesn't have to fit all of the requested characteristics, or even any at all. It must only be appropriate in the given situation. - See Also:
Scopes
-
-