This version is out of date, covering development from v9.0.0 to v9.3.0. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

Tinderbox v9 Icon

StyledString.fontSize(N)


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator Altered: 

 Function   [other Function type actions]

 Item   [operators of similar scope]

 Formatting   [other Formatting operators]

 Baseline

 


StyledString.fontSize(N)

The function sets the referenced string's (RTF) styled text to font size N. N is the desired font size in points.

$Text = $Text + "some bigger text".fontSize(N); 

adds test "some bigger text" in 24pt to the end of $Text.

It is also a good automatic way to reset $Text containing old (or accidental) size-based auto-headings. Code like this can be used as a stamp or other action to reset multiple selected notes:

$Text = $Text.fontSize($TextFontSize); 

This will make each (selected) note use it's own $TextFontSize (which might differ) to reset the size of the entire $Text of the note.

Note that $Text is currently the only attribute capable of holding styled text. String attributes and action code variables, i.e. var(), cannot store styled text. If passed styled text the latter will store the unstyled version of the text being passed. See a more detailed explanation.

String operators respecting StyledString operators

String.paragraphs(), String.replace() and String.substr().