public class AnnotationStandard14FontFactory extends Object implements AnnotationFontFactory
AnnotationFontFactory
implementation providing Standard14Substitute
based fonts.Modifier and Type | Field and Description |
---|---|
protected static FamilyName |
FAMILYNAME_COURIER |
protected static FamilyName |
FAMILYNAME_HELVETICA |
protected static FamilyName |
FAMILYNAME_TIMES |
protected static FamilyName[] |
FAMILYNAMES |
protected FontFactory |
fontFactory |
protected FontManagerFuture |
fontManagerFuture |
protected static Collection<FontAttributeSet> |
STANDARD14_FAMILYNAME_ATTRIBUTES |
Constructor and Description |
---|
AnnotationStandard14FontFactory(FontManagerFuture fontManagerFuture) |
Modifier and Type | Method and Description |
---|---|
Font |
create(FontAttributeSet fontAttributeSet,
Map<String,Object> scope)
Supply a
Font which fits well for the requested parameters. |
Collection<FontAttributeSet> |
getAvailableFontAttributeSets()
Returns available fonts provided by this implementation described via
FontAttributeSet
class. |
protected boolean |
isStandard14Name(StringAttribute attributeName) |
protected static final FamilyName FAMILYNAME_COURIER
protected static final FamilyName FAMILYNAME_HELVETICA
protected static final FamilyName FAMILYNAME_TIMES
protected static final FamilyName[] FAMILYNAMES
protected static final Collection<FontAttributeSet> STANDARD14_FAMILYNAME_ATTRIBUTES
protected final FontManagerFuture fontManagerFuture
protected final FontFactory fontFactory
public AnnotationStandard14FontFactory(FontManagerFuture fontManagerFuture)
public Font create(FontAttributeSet fontAttributeSet, Map<String,Object> scope)
FontFactory
Font
which 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.create
in interface FontFactory
fontAttributeSet
- The Attribute
s 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.Font
deemed appropriate, or null
if no such Font
is
available. Some implementations might be able to return a Font
which fits all
requested characteristics. Others might have several to choose from or none at all. The
Font
which 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.Scopes
public Collection<FontAttributeSet> getAvailableFontAttributeSets()
AnnotationFontFactory
FontAttributeSet
class.
This method is currently used by annotation based font face editors. Current implementations
provide a simple FontAttributeSet
definition containing FamilyName
attribute
only.getAvailableFontAttributeSets
in interface AnnotationFontFactory
FontAttributeSet
definitionprotected boolean isStandard14Name(StringAttribute attributeName)
Copyright © 2024 levigo holding gmbh. All rights reserved.