Viz Plug-ins User Guide

Version 5.0 | Published December 20, 2022 ©

Control Text

images/download/thumbnails/85901544/image2022-11-10_13-51-39.png
The Control Text plug-in binds the control of Text or Classic Text to a Control Object depending on the container geometry. If neither Text or Classic Text is in the container, the Control Text plug-in uses the scene setting to determine which render engine to use.

This plug-in expects the input value in UTF-8 encoding.

This plug-in is located in: Plugins -> Container plug-ins -> Control

Control Text Properties

images/download/attachments/85901544/ControlText-properties.png

  • Maximal characters: Sets the maximum number of characters which can be typed into the text field.

  • Upper Case: Converts lower case input into upper case when set to On.

  • Expose kerning*1: Allows changes to the kerning parameters and sets the minimum and maximum value when set to On.

  • Expose line spacing*1: Allows changes to the line spacing parameters and set the minimum and maximum value when set to On.

  • Expose Font: Allows selection of different Font when set to On.

    • The exposed field is .font on Classic Text.

    • The exposed field is .font_face on Text.

  • Expose justification*1: Allows changes to the text justification when set to On.

  • Single Line: Converts multi-line input into a single line when set to On.

  • Use Formatted Text: Enables use of character specific formatting in supported client applications. Character specific formatting includes bold, italic, subscript, superscript, kerning, position, rotation, scaling, alpha, and color(RGB) in Classic Text, modifier, font size, color(ARGB) in Text. Formatted text cannot be used together with the Text FX Write plug-in.

    • To use the characters < and > correctly in Viz Multichannel, make sure that Use Formatted Text is set to OFF.

    • Character specific formatting is not supported for Viz Pilot.

    • In Viz Trio, the operator enter a required formatting mode via an assigned shortcut key. To change the format of one or more characters, hold down ALT and toggle the right and left arrow keys to shift mode. See the Viz Trio User Guide for more information on Character Formatting.

  • Escape formatted text:Simplifies formatted text output. Use XML escape characters instead of XML <![CDATA[]]> and not add an XML root element. Use <fo:wrapper/> element only with formatted words and characters. Control Text still accepts both full formatted and escape formatted text input independent of this property.

  • Include default property values: Add all available properties of formatted text output even all values are defaults. This can guarantee all supported formats by Control Text can be transferred to another Text via XML.

  • Input Value*1: Shows the current value for the plug-in. It is not necessary to set any value here. It is used for debugging purposes.

  • Input Value(UTF8)*2: Shows the current value for the plug-in. It is not necessary to set any value here. It is used for debugging purposes.

  • Simulate classic commands*2: Allow Viz Trio uses Classic Text commands via Control Object to control styles of new Text in Viz Engine Renderer.

*1: only available with Classic Text

*2: only available with Text

Shared Memory Placeholders

The Control Text plug-in supports Shared Memory placeholders. Placeholders can be described by ${shm_key}, where shm_key is the name of a Global Shared Memory Map. You can also define a default value by adding a pipe and the value. For example: ${shm_key,Default}, where Default is used as default value if the Shared Memory Map is empty or does not exist.

Shared Memory maps can be accessed and changed in various ways, like an external command, script etc...

Example

images/download/attachments/85901544/ControlText-shm.png

This shows "Hello world" by default. By sending GLOBAL*MAP SET_STRING_ELEMENT test This is my new value from a shared memory the text changes to the new value.

Formatted Text Wrapper

Format single or multiple characters by cover them with <fo:wrapper /> element and add any or multiple of these attribute attributes.

All available formatters


XML Attribute

Data Type

Min

Max

Note

Example

kerning

letter-spacing

float

-

-

  • Existing value of text is not changed if no new value of these modifiers is specified.

  • This formatter affects space between covered and next and all followed characters.

    • From this example. "END" is moved to the left side of another ("TEST").

<fo:wrapper letter-spacing=    
"80"    
>T</fo:wrapper>
<fo:wrapper letter-spacing= "40" >E</fo:wrapper>
<fo:wrapper letter-spacing= "10" >S</fo:wrapper>
<fo:wrapper letter-spacing= "-360" >T</fo:wrapper>END

color

color

3 of ubyte

#000000

#FFFFFF

Contains value of red, green and blue in hexadecimal from 00 to FF lead by #:

  • #FF0000: brightest red

  • #00FF00: brightest green

  • #0000FF: brightest blue

<fo:wrapper color= "#FF0000" >T</fo:wrapper>
<fo:wrapper color= "#00FF00" >E</fo:wrapper>
<fo:wrapper color= "#0000FF" >S</fo:wrapper>
<fo:wrapper color= "#000000" >T</fo:wrapper>

underline

underline

boolean

true/false

  • Existing value of text is not changed if no new value of these modifiers is specified.

<fo:wrapper underline= " true " >TEST</fo:wrapper>

Available Classic Text formatters


XML Attribute

Data Type

Min

Max

Note

Example

scale

scale-x

float

0.0

-

  • Should be only positive value otherwise the backface is on the front side and be invisible until enable "Back-Face" drawing in Expert plug-in.

<fo:wrapper scale-x=    
"3.0"    
 scale-y=    
"3.0"    
>T</fo:wrapper>
<fo:wrapper scale-x= "2.0" scale-y= "2.0" >E</fo:wrapper>
<fo:wrapper scale-x= "1.0" scale-y= "1.0" >S</fo:wrapper>
<fo:wrapper scale-x= "0.4" scale-y= "0.4" >T</fo:wrapper>

scale-y

float

0.0

-

scale-z

float

0.0

-

position

pos-x

float

-

-

  • Relates to default position of each character.

<fo:wrapper pos-y=    
"-30"    
>T</fo:wrapper>
<fo:wrapper pos-y= "-10" >E</fo:wrapper>
<fo:wrapper pos-y= "10" >S</fo:wrapper>
<fo:wrapper pos-y= "30" >T</fo:wrapper>

pos-y

float

-

-

pos-z

float

-

-

rotation

rotate-x

float

-

-

  • 1 round rotation is 360 (counterclockwise) or -360 (clockwise).

<fo:wrapper rotate-x= "15" >T</fo:wrapper>
<fo:wrapper rotate-x= "30" >E</fo:wrapper>
<fo:wrapper rotate-x= "45" >S</fo:wrapper>
<fo:wrapper rotate-x= "60" >T</fo:wrapper>

rotate-y

float

-

-

rotate-z

float

-

-

alpha

opacity

float

0

100

  • Existing value of text is not changed if no new value of these modifiers is specified.

  • Subscript and superscript cannot be true at the same time.

<fo:wrapper opacity= "80" >T</fo:wrapper>
<fo:wrapper opacity= "60" >E</fo:wrapper>
<fo:wrapper opacity= "40" >S</fo:wrapper>
<fo:wrapper opacity= "20" >T</fo:wrapper>


bold

boolean

true/false

<fo:wrapper bold=    
"    
true    
"    
>TEST</fo:wrapper>


italic

boolean

true/false

<fo:wrapper italic=    
"    
true    
"    
>TEST</fo:wrapper>


subscript

boolean

true/false

<fo:wrapper subscript=    
"    
true    
"    
 superscript=    
"    
false    
"    
>TEST</fo:wrapper>

superscript

boolean

true/false

<fo:wrapper subscript=    
"    
false    
"    
 superscript=    
"    
true    
"    
>TEST</fo:wrapper>

font

font

FONT


<fo:wrapper font=    
"<00AF0E0D-625C-184B-98AE54ADA55B6239>"    
>TEST</fo:wrapper>
<fo:wrapper font= "FONT*Fonts/JS-Wansika-Italic" >TEST</fo:wrapper>
<fo:wrapper font= "Fonts/JS-Wansika-Italic" >TEST</fo:wrapper>

Available Text formatters


XML Attribute

Data Type

Min

Max

Note

Example

color

color

3-4 of ubyte

#00000000

#FFFFFFFF

Contains value of alpha (optional), red, green and blue in hexadecimal from 00 to FF lead by #:

  • #FF0000: brightest red

  • #00FF00: brightest green

  • #0000FF: brightest blue

  • #00000000: transparent (zero alpha)

  • #FF000000: opaque (highest alpha)

Default alpha value is #FF if not specified

<fo:wrapper color= "#FF0000" >T</fo:wrapper>
<fo:wrapper color= "#00FF00" >E</fo:wrapper>
<fo:wrapper color= "#0000FF" >S</fo:wrapper>
<fo:wrapper color= "#000000" >T</fo:wrapper>

<fo:wrapper color=" #40808080 ">O</fo:wrapper>
<fo:wrapper color=" #80808080 ">P</fo:wrapper>
<fo:wrapper color=" #B0808080 ">A</fo:wrapper>
<fo:wrapper color=" #D0808080 ">Q</fo:wrapper>

modifier

modifier

modifier

subscript/superscript/none

  • Existing value of text is not changed if no new value of these modifiers is specified.

<fo:wrapper modifier=    
"subscript"    
>TEST</fo:wrapper>
<fo:wrapper modifier= "superscript" >TEST</fo:wrapper>
<fo:wrapper modifier= "none" >TEST</fo:wrapper>

font

font

FONT_FACE


<fo:wrapper font=    
"<41E57305-1205-4742-96DA817BCA632729>"    
>TEST</fo:wrapper>
<fo:wrapper font= "FONT_FACE*Fonts/JS_Wansika_Italic" >TEST</fo:wrapper>
<fo:wrapper font= "Fonts/JS_Wansika_Italic" >TEST</fo:wrapper>


<fo:wrapper /> element can be covered by another such as:

Formatters

<fo:wrapper bold="true" color="#ff0000"> Th <fo:wrapper color="#ffffff"> a <fo:wrapper color="#0000ff"> il </fo:wrapper> a </fo:wrapper> nd </fo:wrapper>

Result

Th a il a nd

Entities

Support three entities in formatted text for preventing broken formatter XML.

Character

Entity

Character

Entity

<

&lt;

>

&gt;

&

&amp;

Example

Formatter

<fo:wrapper color="#FF0000">&lt;sender&gt;John &amp; Smith&lt;/sender&gt;</fo:wrapper>

Result

<sender>John & Smith</sender>

CDATA section

CData section can be used for preventing broken formatter XML too, but with more readable text.

Can be used to send plain text into Control Classic Text plug-in with enabled "Use formatted text" but many existing formats such as bold, italic, underline subscript and superscript in current text still are kept.

Example

Formatter

<fo:wrapper color="#ff0000"><![CDATA[<sender>John & Smith</sender>]]></fo:wrapper>

Result

<sender>John & Smith</sender>

Can rest all existing formats by assigning those new values, but the plain text should not contain "]]>".

Example

With Classic Text

<fo:wrapper letter-spacing=" 0 " color="#000000" opacity =" 1 0 0 " bold=" false " italic=" false" underline=" false " subscript=" false " superscript=" false " font=" <00AF0E0D-625C-184B-98AE54ADA55B6239> " ><![CDATA[Any plain text]]></fo:wrapper>

With Text

<fo:wrapper letter-spacing=" 0 " color="#000000" underline=" false " modifier="none" font=" <41E57305-1205-4742-96DA817BCA632729> " ><![CDATA[Any plain text]]></fo:wrapper>

See Also