public interface PlatformFontResolver extends Serializable
Font objects.
| Modifier and Type | Method and Description |
|---|---|
void |
addFont(Font font)
Adds a font to the set of fonts that are examined for resolving of platform names.
|
void |
addFont(PlatformFontDescription platformDesc,
Font font)
Adds a font to the set of fonts that are examined for resolving of platform names.
|
Font |
findFont(PlatformFontSearchAttributes searchAttributes)
Find a Font that matches the provided description.
|
boolean |
isEmpty() |
FontResolutionPriority |
setResolutionPriority(FontResolutionPriority priority)
Set the resolution mechanism that the PlatformNameResoulver should use to decide which
font should be chosen when two fonts have the same platform name.
|
FontResolutionPriority setResolutionPriority(FontResolutionPriority priority)
FontResolutionPriority.INTELLIGENT_FIRST specifies
that an "intelligent" determination is made about the fonts and the "better" of the two font is chosen.
If the "intelligent" resolver can make no distinction between the fonts then the first font to have
been added first is chosen.
FontResolutionPriority.INTELLIGENT_LAST specifies
that an "intelligent" determination is made about the fonts and the "better" of the two font is chosen.
If the "intelligent" resolver can make no distinction between the fonts then the first font to have
been added last is chosen.
FontResolutionPriority.FIRST specifies
the first font added to the font set that matches the platform attributes is chosen.
FontResolutionPriority.LAST specifies
the last font added to the font set that matches the platform attributes is chosen.
priority - The resolution mechanism to usevoid addFont(Font font) throws UnsupportedFontException, InvalidFontException, FontLoadingException
FontResolutionPriority.font - the font to add to the fonts used for platform resolutionUnsupportedFontExceptionFontLoadingExceptionInvalidFontExceptionvoid addFont(PlatformFontDescription platformDesc, Font font) throws UnsupportedFontException, InvalidFontException, FontLoadingException
FontResolutionPriority.
Note that the PlatformFontDescription is NOT pushed down into the Font. It is only an
alias in the database. Thus, calling
font.getPostscriptFontDescription()
will not return the description
passed in through this method but will instead return the original platform description
of the font.
platformDesc - the platform description of the fontfont - the font to add to the fonts used for platform resolutionUnsupportedFontExceptionFontLoadingExceptionInvalidFontExceptionboolean isEmpty()
true if the font set is empty (has no fonts); false otherwiseFont findFont(PlatformFontSearchAttributes searchAttributes)
searchAttributes - the platform font attributes to search forCopyright © 2010 - 2020 Adobe. All Rights Reserved