JSignage:TextTutorial1

From SpinetiX Support Wiki

Jump to: navigation, search

Description

Displaying text in jSignage

  • Create a layer of type "textArea" with some text formatting attributes to set the color and font for all the text.
  • The text string itself is added by the .tspan() method.
  • The text is centered into the frame by default.
  • Note the use of the frame attribute to materialize the textArea boundaries.

Source code

$.textArea({
        left: 240,
        top: 60,
        width: 800,
        height: 600,
        frame: { frameColor: 'black', frameSize: 2 },
        fill: '#008000',
        fontFamily: 'Comic Sans MS',
        fontSize: 40
}).text( 'Hello !' ).addTo( 'svg' );

Preview

This page was last modified on 9 August 2017, at 16:21.