Interface PDFFontSet
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
PDFFontSetImpl
This interface provides access to the methods that a client can use to build a font set
that is used by in the formatting of text within a PDF document.
PDFFontSet objects implement the Serializable interface. The intent is that PDFFontSet objects
would generally not be entirely regenerated from scratch. Instead, they would be deserialized.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFallbackFont
(Locale locale, Font font) Add a givenFont
to thePDFFontSet
for use as a fallback font for the given locale.void
addFallbackFont
(Locale locale, Font[] fonts) Add an array ofFont
objects to thePDFFontSet
for use as a fallback font for the given locale.void
Add a givenFont
to thePDFFontSet
for use in font lookup.void
Add an array ofFont
objects to thePDFFontSet
for use in font lookup.void
Add an array ofFont
objects to thePDFFontSet
for use in font lookup.void
Add a givenFont
to thePDFFontSet
for use in font lookup.void
addFont
(Font font, PostscriptFontDescription[] psDescriptions, CSS20FontDescription[] cssDescriptions) Add a givenFont
to thePDFFontSet
.Returns the set of fallback fonts added to this font set.boolean
Returns true if there is a "final fallback" font installed in ULocale.ROOT.void
setGenericFontFamilyName
(CSS20GenericFontFamily family, String[] replacements) An array of font family names to use as replacements for the generic CSS font family names.void
setIgnoreFontLoadingErrors
(boolean ignoreFontLoadingErrors) Sets if any error while adding font to fontset should be ignored
-
Field Details
-
ARABIC
-
THAI
-
HEBREW
-
-
Method Details
-
hasRootFallback
Returns true if there is a "final fallback" font installed in ULocale.ROOT.- Throws:
PDFFontException
-
addFont
Add a givenFont
to thePDFFontSet
for use in font lookup. There is an inherent priority ordering based on the order thatFont
objects are added with earlier added fonts having higher priority. The font shall be added for default locale available and windows platform. If clients want to specify locale and platform then they should calladdFont(Font, Platform, ULocale)
.- Parameters:
font
- a non-null valid Font object- Throws:
PDFFontException
-
addFont
Add a givenFont
to thePDFFontSet
for use in font lookup. There is an inherent priority ordering based on the order thatFont
objects are added with earlier added fonts having higher priority. The font shall be added for locale and platform specified by clients. If either of the platform and locale are passed as null then defaults shall be used.- Parameters:
font
- a non-null valid Font object- Throws:
PDFFontException
-
addFont
void addFont(Font font, PostscriptFontDescription[] psDescriptions, CSS20FontDescription[] cssDescriptions) throws PDFFontException Add a givenFont
to thePDFFontSet
. The provided PostScript and CSS font descriptions will be used during font lookup. Either array of descriptions can be null. If theFont
's native font descriptions are also desired, both this API andother addFont variants
can be called with the same Font instance. There is an inherent priority ordering based on the order thatFont
objects are added with earlier added fonts having higher priority.- Throws:
PDFFontException
-
addFont
Add an array ofFont
objects to thePDFFontSet
for use in font lookup. There is an inherent priority ordering based on the order that Font objects are added with earlier added fonts having higher priority. These fonts shall be added for default locale available and windows platform. If clients want to specify locale and platform then they should calladdFont(Font[], Platform, ULocale)
.- Parameters:
fonts
- a non-null array of non-null valid Font objects- Throws:
PDFFontException
-
addFont
Add an array ofFont
objects to thePDFFontSet
for use in font lookup. There is an inherent priority ordering based on the order that Font objects are added with earlier added fonts having higher priority. The font shall be added for locale and platform specified by clients. If either of the platform and locale are passed as null then defaults shall be used.- Parameters:
fonts
- a non-null array of non-null valid Font objects- Throws:
PDFFontException
-
addFallbackFont
Add a givenFont
to thePDFFontSet
for use as a fallback font for the given locale. There is an inherent priority ordering based on the order that Font objects are added with earlier added fonts having higher priority.- Parameters:
locale
- the locale for which this fallback font should be usedfont
- a non-null valid Font object- Throws:
PDFFontException
-
addFallbackFont
Add an array ofFont
objects to thePDFFontSet
for use as a fallback font for the given locale. There is an inherent priority ordering based on the order that Font objects are added with earlier added fonts having higher priority.- Parameters:
locale
- the locale for which this fallback font should be usedfonts
- a non-null array of non-null valid Font objects- Throws:
PDFFontException
-
setGenericFontFamilyName
void setGenericFontFamilyName(CSS20GenericFontFamily family, String[] replacements) throws PDFFontException An array of font family names to use as replacements for the generic CSS font family names. This array of font family names replaces any previously set names for the specific font family.- Parameters:
family
-replacements
- a non-null array of non-null valid String objects- Throws:
PDFFontException
- See Also:
-
getFallbackFontSet
Returns the set of fallback fonts added to this font set.- Returns:
- The set of fallback fonts added to this font set.
- Throws:
PDFFontException
-
setIgnoreFontLoadingErrors
void setIgnoreFontLoadingErrors(boolean ignoreFontLoadingErrors) Sets if any error while adding font to fontset should be ignored- Parameters:
ignoreFontLoadingErrors
-
-