User Tools

Site Tools


jwlua:enigmastrings

This is an old revision of the document!


Enigma Strings - General Syntax

An Enigma string is a string where commands can be inserted. A command starts with a caret (^). All commands ends with a () pair that for some commands contains parameters.

A double caret ^^ in an Enigma string will insert a single ^ to the printed text.

Fonts

^font(string [,integer])

The string appears without quotes.

The integer contains a specific information about the font (such as the platform). For JW Lua scripts, this parameter can usually be skipped.

^nfx(integer)

The font styles as a bit set coded as an integer. Use FCFontInfo:CreateEnigmaStyleString() to get the string to use from an existing style.

^nfx(0) would mean a plain font style.

^size(integer)

The font size, where the integer value is in points.

Formatting

The Enigma strings support a couple of text formatting commands that can be inserted in the text. Each command listed below should be preceded by a ^.

baseline(integer) The baseline shift value.
superscript(integer) The superscript value.
tracking(integer) The tracking value.

Text Inserts

All text insert commands listed below should be preceded by a ^ (the Wiki system doesn't seem to allow that syntax in a table).

arranger() The arranger name text insert (defined in the File Info).
composer() The composer name text insert (defined in the File Info).
copyright() The copyright text insert (defined in the File Info).
cprsym() The copyright symbol.
date(integer) The current date. The integer parameter is the date format: 0 - short, 1 - long
dbflat() The double flat text insert.
dbsharp() The double sharp text insert.
description() The description text insert (defined in the File Info).
fdate(integer) The file date. The integer parameter is the date format: 0 - short, 1 - long
filename() The document's file name.
flat() The “flat” symbold text insert.
lyricist() The lyricist text insert (defined in the File Info).
natural() The “natural” symbol text insert.
page(integer) The page number with the added offset of the integer value. 0 as an offset would mean that the first page have page number 1.
partname() The score/part name for the score/part in scope.
perftime(integer) The playback/performance time text insert. The integer parameter is a time format specifier: 0 - m:ss, 1 - hh:mm:ss, 2 - hh:mm:ss.1000nds, 3 - hh:mm, 4 - m´ss´´, 5 - m
sharp() A “sharp” symbol text insert.
subtitle() The subtitle text insert (defined in the File Info).
title() The title text insert (defined in the File Info).
time(integer) The current time. The integer parameter is a time format specifier, see the perftime() text insert.
totpages() The text insert for total number of pages in the current score/part.

Misc.

There's also a ^url() command to format hyperlinks. Syntax currently unknown.

jwlua/enigmastrings.1382126305.txt.gz · Last modified: 2013/10/18 19:58 by jariw