Class FXGFontResolverImpl
- java.lang.Object
-
- com.adobe.fontengine.fontmanagement.fxg.FXGFontResolverImpl
-
- All Implemented Interfaces:
FXGFontResolver,java.io.Serializable
public class FXGFontResolverImpl extends java.lang.Object implements FXGFontResolver
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FXGFontResolverImpl()FXGFontResolverImpl(FXGFontResolverImpl original)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFont(Font font)Adds a font to the set of fonts that are examined for resolving of FXG descriptions.voidaddFont(FXGFontDescription fxgDesc, Font font)Adds a font to the set of fonts that are examined for resolving of FXG names.booleanequals(java.lang.Object obj)FontfindFont(FXGFontSearchAttributes searchAttributes)Find a Font that matches the provided description.inthashCode()booleanisEmpty()FontResolutionPrioritysetResolutionPriority(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.java.lang.StringtoString()
-
-
-
Constructor Detail
-
FXGFontResolverImpl
public FXGFontResolverImpl()
-
FXGFontResolverImpl
public FXGFontResolverImpl(FXGFontResolverImpl original)
-
-
Method Detail
-
addFont
public void addFont(Font font) throws UnsupportedFontException, InvalidFontException, FontLoadingException
Description copied from interface:FXGFontResolverAdds a font to the set of fonts that are examined for resolving of FXG descriptions. If this font is indistinguishable from another font already in the font set then which of the two that is kept is determined by the settings ofFontResolutionPriority.- Specified by:
addFontin interfaceFXGFontResolver- Parameters:
font- the font to add to the fonts used for FXG resolution- Throws:
UnsupportedFontExceptionInvalidFontExceptionFontLoadingException
-
addFont
public void addFont(FXGFontDescription fxgDesc, Font font) throws UnsupportedFontException, InvalidFontException, FontLoadingException
Description copied from interface:FXGFontResolverAdds a font to the set of fonts that are examined for resolving of FXG names. If this font's PlatformFontDescription is indistinguishable from another font already in the font set then which of the two that is kept is determined by the settings ofFontResolutionPriority.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.- Specified by:
addFontin interfaceFXGFontResolver- Parameters:
fxgDesc- the FXG description of the fontfont- the font to add to the fonts used for FXG resolution- Throws:
UnsupportedFontExceptionInvalidFontExceptionFontLoadingException
-
findFont
public Font findFont(FXGFontSearchAttributes searchAttributes)
Description copied from interface:FXGFontResolverFind a Font that matches the provided description. No analysis (e.g., removal of a CMap extension) is done by this function.- Specified by:
findFontin interfaceFXGFontResolver- Parameters:
searchAttributes- the FXG font attributes to search for- Returns:
- the Font.
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceFXGFontResolver- Returns:
trueif the font set is empty (has no fonts);falseotherwise
-
setResolutionPriority
public FontResolutionPriority setResolutionPriority(FontResolutionPriority priority)
Description copied from interface:FXGFontResolverSet the resolution mechanism that the FXGNameResolver should use to decide which font should be chosen when two fonts have the same FXG description.FontResolutionPriority.INTELLIGENT_FIRSTspecifies 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_LASTspecifies 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.FIRSTspecifies the first font added to the font set that matches the FXG attributes is chosen.FontResolutionPriority.LASTspecifies the last font added to the font set that matches the FXG attributes is chosen.- Specified by:
setResolutionPriorityin interfaceFXGFontResolver- Parameters:
priority- The resolution mechanism to use- Returns:
- The old resolution priority setting.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-