Class IntelligentResolver
java.lang.Object
com.adobe.fontengine.fontmanagement.IntelligentResolver
A namespace object that contains one method: choosePreferredFont.
Synchronization
This class contains no mutable static or non-static data, so it can be used safely from multiple threads. This module has been rewritten (and reformatted) to use the new CacheSupportInfo helper class that can cache the information it needs. That allows the resolver to operate without actually parsing the fonts its operating on, assuming the needed CacheSupportInfo objects already exist in the cache.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FontchoosePreferredFont(Font f1, Font f2, boolean preferFirst) Given 2 fonts that are "the same", pick one to be preferred.
-
Constructor Details
-
IntelligentResolver
public IntelligentResolver()
-
-
Method Details
-
choosePreferredFont
public static Font choosePreferredFont(Font f1, Font f2, boolean preferFirst) throws UnsupportedFontException, InvalidFontException, FontLoadingException Given 2 fonts that are "the same", pick one to be preferred.- Parameters:
f1- the first fontf2- the second fontpreferFirst- if the fonts are "identical" which one to pick- Returns:
- The preferred of f1 or f2. Note that if f1 and f2 are indistinguishable, f1 is returned, which means that choosePreferredFont(f1, f2) may not equal choosePreferredFont(f2, f1)
- Throws:
UnsupportedFontExceptionInvalidFontExceptionFontLoadingException
-