DsPdfJS API - v9.1.0
    Preparing search index...

    Type Alias FormatProperties

    Represents text formatting attributes such as font, colors, decorations and so on.

    type FormatProperties = {
        backColor?: Color;
        baseFormat?: Format | null;
        bold?: boolean;
        charWidthFactor?: number;
        doubleUnderline?: boolean;
        fillBrush?: Brush | null;
        font?: Font | null;
        fontFamily?: string;
        fontFeatures?: FontFeature[] | null;
        fontSize?: number;
        foreColor?: Color;
        glyphAdvanceFactor?: number;
        glyphAdvanceOffset?: number;
        glyphWidths?: GlyphWidths;
        hollow?: boolean;
        italic?: boolean;
        language?: string;
        lineGap?: number | null;
        paletteIndex?: number | null;
        recalcFontSizeForFallbackFonts?: boolean;
        sidewaysInVerticalText?: boolean;
        skipNormalization?: boolean;
        strictCanonicalDecomposition?: boolean;
        strikethrough?: boolean;
        strokePen?: Pen | null;
        subscript?: boolean;
        superscript?: boolean;
        textRunAsCluster?: boolean;
        transformToFullWidth?: boolean;
        transverseOffset?: number;
        treatHyphenMinusAsHyphen?: boolean;
        underline?: boolean;
        uprightInVerticalText?: boolean;
        useHorizontalMetricsForVerticalText?: boolean;
        useTypoMetrics?: boolean;
        useVerticalLineGapForSideways?: boolean;
    }
    Index

    Properties

    backColor?: Color

    Text background color. The default is transparent. Overrides the value from base format if FormatProperties.baseFormat is specified.

    baseFormat?: Format | null

    A reference to the Format object to copy the initial data from.

    bold?: boolean

    Indicates whether the font should be bolded. Overrides the value from base format if FormatProperties.baseFormat is specified.

    charWidthFactor?: number

    The character width scale factor. Valid values are between 0.1 and 10.0. The default is 1. Overrides the value from base format if FormatProperties.baseFormat is specified.

    doubleUnderline?: boolean

    Indicates if the text is double underlined. Overrides the value from base format if FormatProperties.baseFormat is specified.

    fillBrush?: Brush | null

    A reference to the brush to fill the glyphs. This property has a priority over the foreColor. Overrides the value from base format if FormatProperties.baseFormat is specified.

    font?: Font | null

    A reference to the font to be used by this format. Overrides the value from base format if FormatProperties.baseFormat is specified.

    fontFamily?: string

    The font family name. Overrides the value from base format if FormatProperties.baseFormat is specified.

    fontFeatures?: FontFeature[] | null

    The array of Microsoft OpenType typography properties. Overrides the value from base format if FormatProperties.baseFormat is specified.

    fontSize?: number

    The logical font size, in graphic units. The default value is 16. Overrides the value from base format if FormatProperties.baseFormat is specified.

    foreColor?: Color

    Text foreground color. The default is black. Overrides the value from base format if FormatProperties.baseFormat is specified.

    glyphAdvanceFactor?: number

    The scaling factor for the glyph advance value relative to font's Average Character Width. Valid values are from 0.5 up. The default is 1. Overrides the value from base format if FormatProperties.baseFormat is specified.

    glyphAdvanceOffset?: number

    The absolute increment (delta) for the glyph advance value, in graphic units. Overrides the value from base format if FormatProperties.baseFormat is specified.

    glyphWidths?: GlyphWidths

    The preferred glyph widths (generally used in CJKV fonts). Overrides the value from base format if FormatProperties.baseFormat is specified.

    hollow?: boolean

    Indicates if the glyphs are hollow (outlined), otherwise they are solid. The strokePen property must be set in order to draw outlined glyphs. Overrides the value from base format if FormatProperties.baseFormat is specified.

    italic?: boolean

    Indicates whether the font should be italicized. Overrides the value from base format if FormatProperties.baseFormat is specified.

    language?: string

    The Neutral Culture string. Overrides the value from base format if FormatProperties.baseFormat is specified.

    lineGap?: number | null

    Specifies the explicit line gap (if not null), in graphic units. Overrides the value from base format if FormatProperties.baseFormat is specified.

    paletteIndex?: number | null

    Index of a palette used for drawing color fonts. Overrides the value from base format if FormatProperties.baseFormat is specified.

    recalcFontSizeForFallbackFonts?: boolean

    Indicates whether the size of a fallback font should be coerced to the size of original font. The default is true. Overrides the value from base format if FormatProperties.baseFormat is specified.

    sidewaysInVerticalText?: boolean

    Indicates if all characters should appear as rotated 90 or -90 degrees in vertical text. Overrides the value from base format if FormatProperties.baseFormat is specified.

    skipNormalization?: boolean

    Indicates whether the canonical decomposition, reordering, and composition stages should be omitted. Overrides the value from base format if FormatProperties.baseFormat is specified.

    strictCanonicalDecomposition?: boolean

    Indicates whether to apply normalization to Singleton Decompositions and Post Composition Version precomposed characters. If set to true, CJK compatibility ideographs can be changed to CJK unified ideographs during the normalization process. Overrides the value from base format if FormatProperties.baseFormat is specified.

    strikethrough?: boolean

    Indicates if the strikethrough style is applied to the text. Overrides the value from base format if FormatProperties.baseFormat is specified.

    strokePen?: Pen | null

    A reference to the pen to draw glyph outlines. Overrides the value from base format if FormatProperties.baseFormat is specified.

    subscript?: boolean

    Indicates if the glyphs should be displayed as subscript. Overrides the value from base format if FormatProperties.baseFormat is specified.

    superscript?: boolean

    Indicates if the glyphs should be displayed as superscript. Overrides the value from base format if FormatProperties.baseFormat is specified.

    textRunAsCluster?: boolean

    Indicates whether the whole text run should be considered as a single Grapheme Cluster. It allows displaying several characters side-by-side horizontally in vertical text. Overrides the value from base format if FormatProperties.baseFormat is specified.

    transformToFullWidth?: boolean

    Indicates if ASCII characters should be transformed into fullwidth characters. Overrides the value from base format if FormatProperties.baseFormat is specified.

    transverseOffset?: number

    The offset of the text in the orthogonal direction, in graphic units. The default is 0. Overrides the value from base format if FormatProperties.baseFormat is specified.

    treatHyphenMinusAsHyphen?: boolean

    Indicates whether the character 'HYPHEN-MINUS' (U+002D) is treated as the character 'HYPHEN' (U+2010) by the Unicode line breaking algorithm. Overrides the value from base format if FormatProperties.baseFormat is specified.

    underline?: boolean

    Indicates if the text is underlined. Overrides the value from base format if FormatProperties.baseFormat is specified.

    uprightInVerticalText?: boolean

    Indicates if the normally sideways characters should be drawn upright in vertical text. Overrides the value from base format if FormatProperties.baseFormat is specified.

    useHorizontalMetricsForVerticalText?: boolean

    Indicates if the horizontal ascending, descending, and line gap settings should be applied to vertical text. The special vertical metrics are used by default. Overrides the value from base format if FormatProperties.baseFormat is specified.

    useTypoMetrics?: boolean

    Indicates whether the typographical font metrics should be applied instead of Windows-specific and Apple-specific font metrics. Overrides the value from base format if FormatProperties.baseFormat is specified.

    useVerticalLineGapForSideways?: boolean

    Indicates that for sideways text in vertical flow, line gap will be set according to Font.verticalLineGap. If false (the default), line gap for lines containing sideways text is set according to Font.horizontalLineGap, which can lead to different gaps between columns that contain sideways text runs and those that do not. Overrides the value from base format if FormatProperties.baseFormat is specified.