Package com.lowagie.text
Class TextRenderingOptions
- java.lang.Object
-
- com.lowagie.text.TextRenderingOptions
-
public class TextRenderingOptions extends Object
Text rendering options, including the default language of the document and a flag to enable font glyph substitution (if FOP is available).- Since:
- 3.1.15
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
- See Also:
Document.setTextRenderingOptions(TextRenderingOptions)
-
-
Field Summary
Fields Modifier and Type Field Description static StringDOCUMENT_LANGUAGE_DEFAULT
-
Constructor Summary
Constructors Constructor Description TextRenderingOptions()Creates a text rendering options instance with the default options: glyph substitution enabled and "dflt" as document language.TextRenderingOptions(String documentLanguage, boolean glyphSubstitutionEnabled)Creates a text rendering options instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDocumentLanguage()The default language of the document.booleanisGlyphSubstitutionEnabled()Returns the glyph substitution enabled flag.TextRenderingOptionswithDocumentLanguage(String documentLanguage)Returns a new instance with the specified document language.TextRenderingOptionswithGlyphSubstitutionsEnabled(boolean glyphSubstitutionEnabled)Returns a new instance with the specified glyph substitution enabled flag.
-
-
-
Field Detail
-
DOCUMENT_LANGUAGE_DEFAULT
public static final String DOCUMENT_LANGUAGE_DEFAULT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TextRenderingOptions
public TextRenderingOptions()
Creates a text rendering options instance with the default options: glyph substitution enabled and "dflt" as document language.
-
TextRenderingOptions
public TextRenderingOptions(String documentLanguage, boolean glyphSubstitutionEnabled)
Creates a text rendering options instance.- Parameters:
documentLanguage- the wanted languageglyphSubstitutionEnabled-
-
-
Method Detail
-
getDocumentLanguage
public String getDocumentLanguage()
The default language of the document. Can be set to values like "en_US". This language is used in FopGlyphProcessor to determine which glyphs are to be substituted. The default "dflt" means that all glyphs which can be replaced will be substituted.- Returns:
- the current document language
-
isGlyphSubstitutionEnabled
public boolean isGlyphSubstitutionEnabled()
Returns the glyph substitution enabled flag.- Returns:
- the glyph substitution enabled flag
#see
Document.setGlyphSubstitutionEnabled(boolean)
-
withDocumentLanguage
public TextRenderingOptions withDocumentLanguage(String documentLanguage)
Returns a new instance with the specified document language.- Parameters:
documentLanguage- the document language- Returns:
- a new instance with the document language
-
withGlyphSubstitutionsEnabled
public TextRenderingOptions withGlyphSubstitutionsEnabled(boolean glyphSubstitutionEnabled)
Returns a new instance with the specified glyph substitution enabled flag.- Parameters:
glyphSubstitutionEnabled- whether glyph substitution is enabled- Returns:
- a new instance with the glyph substitution enabled flag
-
-