User Tools

Site Tools


Sidebar

Passage markup

basics

coding

extra

list

section

whitespace

Macros

basics

colour

data structure

date and time

game state

live

maths

number

revision

saving

showing and hiding

string

styling

url

deprecated

Types of data

Special keywords

Special passage tags

harlowe:text-style

(text-style: String) → Changer

This applies a selected built-in text style to the hook's text.

Example usage:

The shadow (text-style: "shadow")[flares] at you! will style the word “flares” with a shadow.

(set: $s to (text-style: "shadow")) The shadow $s[flares] at you! will also style it with a shadow.

Rationale:

While Twine offers markup for common formatting styles like bold and italic, having these styles available from a command macro provides some extra benefits: it's possible, as with all such style macros, to (set:) them into a variable, combine them with other commands, and re-use them succinctly throughout the story (by using the variable in place of the macro).

Furthermore, this macro also offers many less common but equally desirable styles to the author, which are otherwise unavailable or difficult to produce.

Details:

At present, the following text strings will produce a particular style.

You can use the “none” style to remove an existing style from a combined Changer.

Due to browser limitations, hooks using “mirror”, “upside-down”, “rumble” or “shudder” will have its CSS display attribute set to inline-block.

See also:

harlowe/text-style.txt · Last modified: 2017/10/10 00:39 (external edit)