ComPDFKit Web SDK
    Preparing search index...

    Class Font

    Font of form widgets and fields: name, size, type, fill color and stroke color.

    Index
    • get calculatedSize(): number

      Actual font size: not computed here, so 0 when automatic.

      Returns number

    • get fillColor(): Color

      Fill color of the text.

      Returns Color

    • set fillColor(color: ColorInput): void

      Fill color of the text.

      Parameters

      • color: ColorInput

      Returns void

    • get name(): string

      Font name.

      Returns string

    • set name(name: string): void

      Font name.

      Parameters

      • name: string

      Returns void

    • get size(): number

      Font size (pt); 0 is automatic by widget size.

      Returns number

    • set size(size: number): void

      Font size (pt); 0 is automatic by widget size.

      Parameters

      • size: number

      Returns void

    • get strokeColor(): Color

      Stroke color of the text.

      Returns Color

    • set strokeColor(color: ColorInput): void

      Stroke color of the text.

      Parameters

      • color: ColorInput

      Returns void

    • get type(): string

      Font type, such as 'Type1' (the default).

      Returns string

    • Options, another font (copied), or just a font name.

      Parameters

      • Optionaloptions: string | Font | FontOptions

      Returns Font

    • Whether another font has the same name, size, type, fill color and stroke color.

      Parameters

      • other: Font

        The font to compare with.

      Returns boolean

      True when they are equal.

    • Changes the given items; a string is a font name.

      Parameters

      • Optionaloptions: string | Font | FontOptions

      Returns void

    "horizontal-scaling": number | null

    Horizontal scaling of the text (stored only), or null when not set.