public final class PSNameFontDatabase extends Object implements PSNameResolver
| Constructor and Description |
|---|
PSNameFontDatabase() |
PSNameFontDatabase(FamilyNameNormalizer normalizer) |
PSNameFontDatabase(PSNameFontDatabase original) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFont(Font font)
Adds a font to the set of fonts that are examined for resolving of Postscript names.
|
void |
addFont(PostscriptFontDescription psDesc,
Font font)
Adds a font to the set of fonts that are examined for resolving of Postscript names.
|
boolean |
equals(Object obj) |
Font |
findFont(PostscriptFontDescription psDesc)
Deprecated.
This method is deprecated. Use
findFont(String) instead. |
Font |
findFont(String psName) |
int |
hashCode() |
boolean |
isEmpty() |
FontResolutionPriority |
setResolutionPriority(FontResolutionPriority priority)
Set the resolution mechanism that the PSNameResolver should use to decide which
font should be chosen when two fonts have the same Postscript name.
|
String |
toString() |
public PSNameFontDatabase()
public PSNameFontDatabase(FamilyNameNormalizer normalizer)
public PSNameFontDatabase(PSNameFontDatabase original)
public void addFont(Font font) throws UnsupportedFontException, InvalidFontException, FontLoadingException
PSNameResolverFontResolutionPriority.addFont in interface PSNameResolverfont - the font to add to the fonts used for Postscript resolutionUnsupportedFontExceptionInvalidFontExceptionFontLoadingExceptionpublic void addFont(PostscriptFontDescription psDesc, Font font) throws UnsupportedFontException, InvalidFontException, FontLoadingException
PSNameResolverFontResolutionPriority.
Note that the PostscriptFontDescription 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.
addFont in interface PSNameResolverpsDesc - the postscript description of the fontfont - the font to add to the fonts used for Postscript resolutionUnsupportedFontExceptionInvalidFontExceptionFontLoadingExceptionpublic boolean isEmpty()
isEmpty in interface PSNameResolvertrue if the font set is empty (has no fonts); false otherwisepublic Font findFont(PostscriptFontDescription psDesc)
findFont(String) instead.PSNameResolverfindFont in interface PSNameResolverpsDesc - the postscript description of the fontpublic FontResolutionPriority setResolutionPriority(FontResolutionPriority priority)
PSNameResolver 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 Postscript attributes is chosen.
FontResolutionPriority.LAST specifies
the last font added to the font set that matches the Postscript attributes is chosen.
setResolutionPriority in interface PSNameResolverpriority - The resolution mechanism to useCopyright © 2010 - 2020 Adobe. All Rights Reserved