Class 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)
    • 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 language
        glyphSubstitutionEnabled - whether glyph substitution is enabled
    • Method Detail

      • setDocumentLanguage

        public void setDocumentLanguage​(String documentLanguage)
        Sets the default language of the document.
        Parameters:
        documentLanguage - the document language
        See Also:
        getDocumentLanguage()
      • 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
      • setGlyphSubstitutionEnabled

        public void setGlyphSubstitutionEnabled​(boolean glyphSubstitutionEnabled)
        Sets the font glyph substitution enabled flag.
        Parameters:
        glyphSubstitutionEnabled - whether glyph substitution is enabled