public class FXGFontResolverImpl extends Object implements FXGFontResolver
| Constructor and Description |
|---|
FXGFontResolverImpl() |
FXGFontResolverImpl(FXGFontResolverImpl 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 FXG descriptions.
|
void |
addFont(FXGFontDescription fxgDesc,
Font font)
Adds a font to the set of fonts that are examined for resolving of FXG names.
|
boolean |
equals(Object obj) |
Font |
findFont(FXGFontSearchAttributes searchAttributes)
Find a Font that matches the provided description.
|
int |
hashCode() |
boolean |
isEmpty() |
FontResolutionPriority |
setResolutionPriority(FontResolutionPriority priority)
Set the resolution mechanism that the FXGNameResolver should use to decide which
font should be chosen when two fonts have the same FXG description.
|
String |
toString() |
public FXGFontResolverImpl()
public FXGFontResolverImpl(FXGFontResolverImpl original)
public void addFont(Font font) throws UnsupportedFontException, InvalidFontException, FontLoadingException
FXGFontResolverFontResolutionPriority.addFont in interface FXGFontResolverfont - the font to add to the fonts used for FXG resolutionUnsupportedFontExceptionInvalidFontExceptionFontLoadingExceptionpublic void addFont(FXGFontDescription fxgDesc, Font font) throws UnsupportedFontException, InvalidFontException, FontLoadingException
FXGFontResolverFontResolutionPriority.
Note that the PlatformFontDescription is NOT pushed down into the Font. It is only an
alias in the database. Thus, calling
font.getFXGFontDescription()
will not return the description
passed in through this method but will instead return the original FXG description
of the font.
addFont in interface FXGFontResolverfxgDesc - the FXG description of the fontfont - the font to add to the fonts used for FXG resolutionUnsupportedFontExceptionInvalidFontExceptionFontLoadingExceptionpublic Font findFont(FXGFontSearchAttributes searchAttributes)
FXGFontResolverfindFont in interface FXGFontResolversearchAttributes - the FXG font attributes to search forpublic boolean isEmpty()
isEmpty in interface FXGFontResolvertrue if the font set is empty (has no fonts); false otherwisepublic FontResolutionPriority setResolutionPriority(FontResolutionPriority priority)
FXGFontResolver 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 FXG attributes is chosen.
FontResolutionPriority.LAST specifies
the last font added to the font set that matches the FXG attributes is chosen.
setResolutionPriority in interface FXGFontResolverpriority - The resolution mechanism to useCopyright © 2010 - 2020 Adobe. All Rights Reserved