public final class CSS20FontDatabase extends FontSetStack implements CSS20FontSet
| Constructor and Description |
|---|
CSS20FontDatabase() |
CSS20FontDatabase(boolean ignoreVariant) |
CSS20FontDatabase(CSS20FontDatabase original)
Copy Constructor.
|
CSS20FontDatabase(FamilyNameNormalizer normalizer) |
CSS20FontDatabase(FamilyNameNormalizer normalizer,
boolean ignoreVariant) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFont(CSS20FontDescription fontDesc,
Font font)
Adds a font to the set of fonts that are examined for resolving a set of
CSS attributes into an actual font during the formatting process in
PDF16RichTextFormatter.format(com.adobe.fontengine.inlineformatting.AttributedRun, int, int)
and PDF16RichTextFormatter.format(com.adobe.fontengine.inlineformatting.AttributedRun, int, int, boolean). |
void |
addFont(Font font)
Adds a font to the set of fonts that are examined for resolving a set of
CSS attributes into an actual font during the formatting process in
PDF16RichTextFormatter.format(com.adobe.fontengine.inlineformatting.AttributedRun, int, int)
or PDF16RichTextFormatter.format(com.adobe.fontengine.inlineformatting.AttributedRun, int, int, boolean). |
boolean |
equals(Object obj) |
Font |
findFont(CSS20Attribute attributes,
ULocale locale)
Search for a font using the same search as would used by a layout engine using
this fontset.
|
int |
hashCode() |
boolean |
isEmpty()
Tests if the CSS20FontSet has had no fonts added.
|
void |
setFallbackFonts(FallbackFontSet fallbackFontSet)
Set the fallback fonts.
|
void |
setGenericFont(CSS20GenericFontFamily genericFamily,
String[] replacementFontNames)
Set the list of replacement font family names for the specified CSS generic font family.
|
FontResolutionPriority |
setResolutionPriority(FontResolutionPriority priority)
Set the resolution mechanism that the
CSS20FontSet should use to decide which
font should be chosen when two fonts appear identical under the CSS font selection
algorithm. |
String |
toString() |
flattenFontSet, popFontSet, pushFontSet, restoreOriginalFontSetflattenFontSet, popFontSet, pushFontSet, restoreOriginalFontSetpublic CSS20FontDatabase()
public CSS20FontDatabase(boolean ignoreVariant)
public CSS20FontDatabase(FamilyNameNormalizer normalizer)
public CSS20FontDatabase(FamilyNameNormalizer normalizer, boolean ignoreVariant)
public CSS20FontDatabase(CSS20FontDatabase original)
public FontResolutionPriority setResolutionPriority(FontResolutionPriority priority)
CSS20FontSetCSS20FontSet should use to decide which
font should be chosen when two fonts appear identical under the CSS font selection
algorithm. The default resolution priority if none is specified is
FontResolutionPriority#FIRST
FontResolutionPriority#INTELLIGENT specifies
that an "intelligent" determination is made about the fonts and the one that "best"
represents the CSS attributes where they collide is chosen.
FontResolutionPriority#FIRST specifies
the first font added to the font set that matches the CSS attributes is chosen.
FontResolutionPriority#LAST specifies
the last font added to the font set that matches the CSS attributes is chosen.
setResolutionPriority in interface CSS20FontSetpriority - The resolution mechanism to usepublic void addFont(Font font) throws InvalidFontException, UnsupportedFontException, FontLoadingException
CSS20FontSetPDF16RichTextFormatter.format(com.adobe.fontengine.inlineformatting.AttributedRun, int, int)
or PDF16RichTextFormatter.format(com.adobe.fontengine.inlineformatting.AttributedRun, int, int, boolean). If this
font is indistinguisable from another font already in the font set then which
of the two that is preferred is determined by the settings of
CSS20FontSet.setResolutionPriority(com.adobe.fontengine.fontmanagement.FontResolutionPriority).addFont in interface CSS20FontSetfont - the font to add to the fonts used for CSS resolutionInvalidFontExceptionUnsupportedFontExceptionFontLoadingExceptionpublic void addFont(CSS20FontDescription fontDesc, Font font) throws InvalidFontException, UnsupportedFontException, FontLoadingException
CSS20FontSetPDF16RichTextFormatter.format(com.adobe.fontengine.inlineformatting.AttributedRun, int, int)
and PDF16RichTextFormatter.format(com.adobe.fontengine.inlineformatting.AttributedRun, int, int, boolean). If this
font is indistinguisable from another font already in the font set then which
of the two that is preferred is determined by the settings of
CSS20FontSet.setResolutionPriority(com.adobe.fontengine.fontmanagement.FontResolutionPriority). The
CSS attributes of the font are ignored and those provided are used instead.addFont in interface CSS20FontSetfontDesc - the CSS properties to use for this fontfont - the font to add to the fonts used for CSS resolutionInvalidFontExceptionUnsupportedFontExceptionFontLoadingExceptionpublic boolean isEmpty()
CSS20FontSetisEmpty in interface CSS20FontSetCSS20FontSet is empty (has no fonts).public void setGenericFont(CSS20GenericFontFamily genericFamily, String[] replacementFontNames)
CSS20FontSetsetGenericFont in interface CSS20FontSetgenericFamily - the CSS generic font family to assign the replacement fonts to.replacementFontNames - a List of String objects with the
replacement font family names.CSS20GenericFontFamilypublic void setFallbackFonts(FallbackFontSet fallbackFontSet)
CSS20FontSetsetFallbackFonts in interface CSS20FontSetfallbackFontSet - search the fonts in this set when none of the fonts added
by the addFont methods are suitable.public Font findFont(CSS20Attribute attributes, ULocale locale) throws FontException
CSS20FontSetfindFont in interface CSS20FontSetattributes - the CSS 2.0 attributes to search forlocale - the locale for the font searchFontExceptionCopyright © 2010 - 2020 Adobe. All Rights Reserved