Jump to content

Supported Font Style Attributes


Saykrd
 Share

Recommended Posts

So, the documentation on Text objects has a "style" parameter that is described as:

The style object containing style attributes like font, font size

What exactly are all the supported style attributes and are they listed somewhere?

 

Link to comment
Share on other sites

As per the PIXI documentation:

  • [style] Object optional

    The style parameters

    • String optional

      default "bold 20pt Arial" The style and size of the font 

    • [fill=black] Object optional

      A canvas fillstyle that will be used on the text eg "red", "#00FF00" 

    • [align=left] String optional

      An alignment of the multiline text ("left", "center" or "right") 

    • [stroke] String optional

      A canvas fillstyle that will be used on the text stroke eg "blue", "#FCFF00" 

    • [strokeThickness=0] Number optional

      A number that represents the thickness of the stroke. Default is 0 (no stroke) 

    • [wordWrap=false] Boolean optional

      Indicates if word wrap should be used 

    • [wordWrapWidth=100] Number optional

      The width at which text will wrap 

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...