Class PSNameFontDatabase
- java.lang.Object
-
- com.adobe.fontengine.fontmanagement.postscript.PSNameFontDatabase
-
- All Implemented Interfaces:
PSNameResolver,java.io.Serializable
public final class PSNameFontDatabase extends java.lang.Object implements PSNameResolver
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PSNameFontDatabase()PSNameFontDatabase(PSNameFontDatabase original)PSNameFontDatabase(FamilyNameNormalizer normalizer)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddFont(Font font)Adds a font to the set of fonts that are examined for resolving of Postscript names.voidaddFont(PostscriptFontDescription psDesc, Font font)Adds a font to the set of fonts that are examined for resolving of Postscript names.booleanequals(java.lang.Object obj)FontfindFont(PostscriptFontDescription psDesc)Deprecated.This method is deprecated.FontfindFont(java.lang.String psName)inthashCode()booleanisEmpty()FontResolutionPrioritysetResolutionPriority(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.java.lang.StringtoString()
-
-
-
Constructor Detail
-
PSNameFontDatabase
public PSNameFontDatabase()
-
PSNameFontDatabase
public PSNameFontDatabase(FamilyNameNormalizer normalizer)
-
PSNameFontDatabase
public PSNameFontDatabase(PSNameFontDatabase original)
-
-
Method Detail
-
addFont
public void addFont(Font font) throws UnsupportedFontException, InvalidFontException, FontLoadingException
Description copied from interface:PSNameResolverAdds a font to the set of fonts that are examined for resolving of Postscript names. 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 interfacePSNameResolver- Parameters:
font- the font to add to the fonts used for Postscript resolution- Throws:
UnsupportedFontExceptionInvalidFontExceptionFontLoadingException
-
addFont
public void addFont(PostscriptFontDescription psDesc, Font font) throws UnsupportedFontException, InvalidFontException, FontLoadingException
Description copied from interface:PSNameResolverAdds a font to the set of fonts that are examined for resolving of Postscript names. If this font's PostscriptFontDescription 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 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.- Specified by:
addFontin interfacePSNameResolver- Parameters:
psDesc- the postscript description of the fontfont- the font to add to the fonts used for Postscript resolution- Throws:
UnsupportedFontExceptionInvalidFontExceptionFontLoadingException
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacePSNameResolver- Returns:
trueif the font set is empty (has no fonts);falseotherwise
-
findFont
public Font findFont(PostscriptFontDescription psDesc)
Deprecated.This method is deprecated. UsefindFont(String)instead.Description copied from interface:PSNameResolverFind a Font that matches the provided postscript description. No analysis (e.g., removal of a CMap extension) is done by this function.- Specified by:
findFontin interfacePSNameResolver- Parameters:
psDesc- the postscript description of the font- Returns:
- the Font.
-
findFont
public Font findFont(java.lang.String psName)
-
setResolutionPriority
public FontResolutionPriority setResolutionPriority(FontResolutionPriority priority)
Description copied from interface:PSNameResolverSet the resolution mechanism that the PSNameResolver should use to decide which font should be chosen when two fonts have the same Postscript name.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 Postscript attributes is chosen.FontResolutionPriority.LASTspecifies the last font added to the font set that matches the Postscript attributes is chosen.- Specified by:
setResolutionPriorityin interfacePSNameResolver- Parameters:
priority- The resolution mechanism to use- Returns:
- The old resolution priority setting.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-