Text Layers

Text layers display formatted text content in rectangular regions with various scrolling/sizing behaviors.

Constructors

ConstructorDescription
$.textArea()Basic text wrapping in a rectangular region
$.fitTextArea()Auto-sizes font to fill the area
$.headlineTextArea()Single headline, max font size
$.scrollingTextArea()Scrolls long text
$.pingPongTextArea()Bounces text back and forth
$.textBar()Horizontal text ticker bar

All text layers support common layer attributes and frame decoration.

Text Attributes

Alignment

AttributeValuesDefault
textAlign'start', 'center', 'end' 'start'
displayAlign'before' (top), 'center', 'after' (bottom)'before'

Styling

AttributeDescriptionExample
fillText color'white', '#ff0000'
fontFamilyFont name'Arial'
fontSizeSize in px or 'max' 60, 'max'
fontWeightWeight'bold'

Examples

Simple Text

$(function() {
  $.textArea({
    width: '90%', height: '15%', top: '80%', left: '5%',
    fontSize: 60
  }).text("Welcome to jSignage demo").addTo('svg');
});

Auto-Sized Text

$(function() {
  $.textArea({ fontSize: 'max', width: '90%', height: '15%'})
    .text("Welcome").addTo('svg');
});

Formatted Text with tspan

$.textArea({ fontSize: 60 }).text(
  $.tspan("Welcome to ")
    .tspan("jSignage", { fill: 'blue'})
    .tspan(" API demo")
)

Scrolling News Ticker

$.scrollingTextArea({
  top: '80%', height: '10%', lines: 1, lineDur: '2s',
  fill: 'white',
  frame: { backColor: 'black', backOpacity: 0.6 }
}).text("Long text that scrolls automatically").addTo('svg');

Dynamic Clock

$(function() {
  var clock = $.textArea({ fontSize: 'max', width: '90%', height: '20%'}).addTo('svg');
  $.setInterval(function() {
    var d = new Date();
    clock.text(d.getHours() + ':' + d.getMinutes() + ':' + d.getSeconds());
  }, 1000);
});

Related Pages

This page is available in English only
هذه الصفحة متوفرة باللغة الإنجليزية فقط
NS
Media La Vista support
Typically replies natively
مرحباً بكم في دعم SpinetiX عبر واتساب

كيف يمكنني مساعدتكم في حلول اللوحات الرقمية، أو البنية التحتية AV/IT، أو منتجات SpinetiX؟
Hello and welcome to SpinetiX Support on WhatsApp.

How can I help you with digital signage solutions, AV/IT infrastructure, or SpinetiX products?