Inline Text Styling
Inline text styling controls the basic character formatting in PTC Arbortext Layout Developer. This is represented in PTC Arbortext Layout Developer’s Formatting Object Model (FOM) by the fStyle object. Text-based properties are set for the inline style to control the appearance of content.
• fStyle.font, fStyle.weight, fStyle.italic, fStyle.stretch — examples of font properties such typeface, weight, and italic, and stretch for condensed fonts.
As a rule, PTC Arbortext Layout Developer applies font by referring to a specific font file on the system rather than a font family. Certain tools, and the fStyle.font property, work with font families. Be aware that PTC Arbortext Layout Developer typically refers to a specific font file. If the appropriate font file for the bold, italic, or other variant of a font family (typeface) is missing, PTC Arbortext Layout Developer either uses a pseudo version or does not apply that property.
PTC Arbortext Layout Developer provides two pseudo font variant properties. fStyle.pseudoBold implements multiple overprinting to achieve bold effect. fStyle.pseudoItalic slants characters to achieve an italic effect. You can configure the amount of space between the overprinted characters for pseudo bold and the degree of slant of characters for pseudo italic.
• fStyle.height — Text height, which can be specified using absolute or relative values
• fStyle.color — Text color, which can be specified using any PTC Arbortext Layout Developer color
• fStyle.letterSpace, fStyle.letterSpaceSquash, fStyle.letterSpaceExtra, fStyle.wordSpace, fStyle.wordSpaceSquash, fStyle.wordSpaceExtra — Letter and word spacing
When PTC Arbortext Layout Developer is justifying a line of text it can vary the amount of space between letters and words. These have their own properties, which can control both the basic spacing, and the amount of stretch or squash to be applied.
• Other character properties
◦ fStyle.capsMode — Capitalization, specified with the values held by the fStyle.StyleCapsMode constant, for example:
▪ UPPER — All capitals
▪ LOWER — All lowercase
▪ SMALL — Small capitals, with uppercase letters retaining normal size
▪ SMALLER — All small capitals
The height and width of the small capital can also be specified.
◦ fStyle.characterWidth — Fixed widths of characters
◦ fStyle.baselineShift — Vertical offset from the baseline of the current line being formatted
◦ Character transformations
▪ fStyle.rotate — Rotate the individual character on the line
When rotating a character it is useful to also specify the position of the character on the line. This can be specified by setting the vertical format of the character to align it at the top, center, or bottom of the current line.
▪ fStyle.mirror, fStyle.flip — Mirror and flip to transform the character horizontally or vertically
• fStyle.kerningTable — Kerning, where the amount of horizontal shift between pairs of characters can be specified
This can be applied with a single value, or be provided in a table to override the values applied from the font information.
• Hyphenation control properties
◦ fStyle.hyphenationLevel — The hyphenation level
As a rule, the level ranges in strictness from 0 to 10, where 10 allows no hyphenation. Special levels 11 and 12 are also available, for example level 12 turns hyphenation off except when a word is too long to fit in a measure.
◦ fStyle.hyphenationLanguage — Language rules to be used when hyphenating
◦ fStyle.hyphenationCharsBefore, fStyle.hyphenationCharsAfter — The number of characters to appear before or after a hyphen has been inserted to break a line
◦ fStyle.hyphenationCharsMin — The minimum number of characters a word must have before it can be hyphenated
◦ fStyle.hyphenationMaxNum — The maximum number of consecutive lines that can be hyphenated
This avoids the output of a ladder of hyphens down the edge of a column.
◦ Conditions when hyphenation can be disabled:
▪ fStyle.hyphenationOnLastWord — when the word is the last in the paragraph
▪ fStyle.hyphenationUppercaseDisable — when the word is all capitals
▪ fStyle.hyphenationAtPageBreak — when the word is the last on a page
▪ fStyle.hyphenationAtColumnBreak — when the word is the last in a column
◦ fStyle.hyphenationExceptionDictionary, fStyle.hyphenationExceptionDictionary2 — Hyphenation exception dictionaries
Reference to exception dictionaries allows the specification of word break positions that override the positions applied by PTC Arbortext Layout Developer’s hyphenation algorithms. This can include a JavaScript script.
• Text decoration properties
◦ fStyle.underlineRule — an PTC Arbortext Layout Developer rule (fTextRule object and properties) to be placed under text
◦ fStyle.strikethroughRule — an PTC Arbortext Layout Developer rule (fTextRule object and properties) to be placed through the middle of text
◦ fStyle.overlineRule — an PTC Arbortext Layout Developer rule (fTextRule object and properties) to be placed above text.
◦ fStyle.backgroundRule — an PTC Arbortext Layout Developer rule (fTextRule object) used as an inline text background color
Although this property refers to an PTC Arbortext Layout Developer rule, many of the properties do not apply.
◦ fStyle.outlineColor, fStyle.outlineThickness — Text outline on characters
Text outline can draw the outline path of each character in a different color and thickness. This can be used to achieve a pseudo bold effect that is different to overprinting.