Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TextStyle

Hierarchy

  • TextStyle

Index

Constructors

constructor

Properties

applyFill

applyFill: boolean = true

Whether to apply a fill to the style

applyStroke

applyStroke: boolean = false

Whether to apply a stroke to the style

autoLeading

autoLeading: boolean = false

Whether auto leading is enabled for a style

baselineShift

baselineShift: number = 0

The baseline shift value for a style

fillColor

fillColor: [number, number, number] = ...

The fill color of a style

font

font: string = "Arial"

Font of the style

fontSize

fontSize: number = 0

Font size of the style

isAllCaps

isAllCaps: boolean = false

Whether all caps is enabled for a style

isFauxBold

isFauxBold: boolean = false

Whether faux bold is enabled for a style

isFauxItalic

isFauxItalic: boolean = false

Whether faux italic is enabled

isSmallCaps

isSmallCaps: boolean = false

Whether small caps is enabled for a style

leading

leading: number = 60

The leading value for a style

strokeColor

strokeColor: [number, number, number] = ...

The stroke colour of a style

strokeWidth

strokeWidth: number = 0

The stroke width for a style

tracking

tracking: number = 0

Tracking value for a style

Methods

setAllCaps

  • Set the all caps property for a style

    Parameters

    • isAllCaps: boolean

    Returns TextStyle

setApplyFill

  • setApplyFill(applyFill: boolean): TextStyle
  • Enable or disable the fill for a style

    Parameters

    • applyFill: boolean

    Returns TextStyle

setApplyStroke

  • setApplyStroke(applyStroke: boolean): TextStyle
  • Enable or disable the stroke for a style

    Parameters

    • applyStroke: boolean

    Returns TextStyle

setAutoLeading

  • setAutoLeading(autoLeading: boolean): TextStyle
  • Set the auto leading property for a style

    Parameters

    • autoLeading: boolean

    Returns TextStyle

setBaselineShift

  • setBaselineShift(baselineShift: number): TextStyle
  • Set the baseline shift value for a style

    Parameters

    • baselineShift: number

      The baseline shift to set

    Returns TextStyle

setFauxBold

  • setFauxBold(isFauxBold: boolean): TextStyle
  • Set the faux bold property for a style

    Parameters

    • isFauxBold: boolean

    Returns TextStyle

setFauxItalic

  • setFauxItalic(isFauxItalic: boolean): TextStyle
  • Set the faux italic property for a style

    Parameters

    • isFauxItalic: boolean

    Returns TextStyle

setFillColor

  • setFillColor(fillColor: [number, number, number]): TextStyle
  • Set the fill color for a style

    Parameters

    • fillColor: [number, number, number]

      The color to set

    Returns TextStyle

setFont

  • Set the font for a style

    Parameters

    • font: string

      The typeface to set

    Returns TextStyle

setFontSize

  • Set the font size for a style

    Parameters

    • fontSize: number

      Font size in pixels

    Returns TextStyle

setLeading

  • Set the leading value for a style

    Parameters

    • leading: number

    Returns TextStyle

setSmallCaps

  • setSmallCaps(isSmallCaps: boolean): TextStyle
  • Set the small caps property for a style

    Parameters

    • isSmallCaps: boolean

    Returns TextStyle

setStrokeColor

  • setStrokeColor(strokeColor: [number, number, number]): TextStyle
  • Set the stroke colour for a style

    Parameters

    • strokeColor: [number, number, number]

      The color to set

    Returns TextStyle

setStrokeWidth

  • setStrokeWidth(strokeWidth: number): TextStyle
  • Set the stroke width for a style

    Parameters

    • strokeWidth: number

      The stroke width to set

    Returns TextStyle

setText

  • Set the text content of a sourceText property, used when you need to return a style object an set the value

    Parameters

    • text: string

      The string to set

    Returns TextStyle

setTracking

  • Set the tracking style for a style

    Parameters

    • tracking: number

    Returns TextStyle

Generated using TypeDoc