Class IntelligentResolver
- java.lang.Object
-
- com.adobe.fontengine.fontmanagement.IntelligentResolver
-
public final class IntelligentResolver extends java.lang.Object
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 Constructor Description IntelligentResolver()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Font
choosePreferredFont(Font f1, Font f2, boolean preferFirst)
Given 2 fonts that are "the same", pick one to be preferred.
-
-
-
Method Detail
-
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:
UnsupportedFontException
InvalidFontException
FontLoadingException
-
-