Text styles

createCharStyle

createCharStyle(...)

Creates a character style. This function takes the following keyword parameters:

"name" [required] -> name of the char style to create

"font" [optional] -> name of the font to use

fontsize [optional] -> font size to set (double)

"features" [optional] -> nearer typographic details can be defined by a string that might contain the following phrases comma-separated (without spaces!):

-> inherit

-> bold

-> italic

-> underline

-> underlinewords

-> strike

-> superscript

-> subscript

-> outline

-> shadowed

-> allcaps

-> smallcaps

"fillcolor" [optional], "fillshade" [optional] -> specify fill options

"strokecolor" [optional], "strokeshade" [optional] -> specify stroke options

baselineoffset [optional] -> offset of the baseline

shadowxoffset [optional], shadowyoffset [optional] -> offset of the shadow if used

outlinewidth [optional] -> width of the outline if used

underlineoffset [optional], underlinewidth [optional] -> underline options if used

strikethruoffset [optional], strikethruwidth [optional] -> strikethru options if used

scaleh [optional], scalev [optional] -> scale of the chars

tracking [optional] -> tracking of the text

"language" [optional] -> language code

createParagraphStyle

createParagraphStyle(...)

Creates a paragraph style. This function takes the following keyword parameters:

"name" [required] -> specifies the name of the paragraphstyle to create

linespacingmode [optional] -> specifies the linespacing mode; possible modes are:

fixed linespacing: 0

automatic linespacing: 1

baseline grid linespacing: 2

linespacing [optional] -> specifies the linespacing if using fixed linespacing

alignment [optional] -> specifies the alignment of the paragraph

-> left: 0

-> center: 1

-> right: 2

-> justify: 3

-> extend: 4

leftmargin [optional], rightmargin [optional] -> specify the margin

gapbefore [optional], gapafter [optional] -> specify the gaps to the heading and following paragraphs

firstindent [optional] -> the indent of the first line

hasdropcap [optional] -> specifies if there are caps (1 = yes, 0 = no)

dropcaplines [optional] -> height (in lines) of the caps if used

dropcapoffset [optional] -> offset of the caps if used

"charstyle" [optional] -> char style to use

"bullet" [optional] -> string to use as bullet

"tabs" [optional] -> a list containing tab definitions

-> a tab is defined as a tuple with the following format (position,type,fillchar)"

-> position [required] -> float value for the position

-> type [optional] -> left: 0 [default], right: 1, period: 2, comma: 3, center: 4

-> fillchar [optional] -> the char to fill the space; default is none

getCharStyles

getCharStyles() -> list

Return a list of the names of all character styles in the current document.

getCharacterStyle

getCharacterStyle(["name"])

Return name of character style applied to object named "name". If "name" is not given, the currently selected object is used. If current object has a text selection, the name of style applied to start of selection is returned. Otherwise the name of the item default character style is returned.

getParagraphStyle

getParagraphStyle(["name"])

Return name of paragraph style applied to object named "name". If "name" is not given, the currently selected object is used. If current object has a text selection, the name of style applied to start of selection is returned. Otherwise the name of the item default style is returned.

getParagraphStyles

getParagraphStyles() -> list

Return a list of the names of all paragraph styles in the current document.

loadStylesFromFile

loadStylesFromFile("filename")

Loads paragraph styles from the Scribus document at "filename" into the current document.

setCharacterStyle

setCharacterStyle("style" [, "name"])

Apply the named character "style" to the object named "name". If object name is not provided, style is applied on current object selection. If multiple objects are selected or if selected object has no text selection, style is applied on selected objects. Otherwise style is applied to the current text selection.

setParagraphStyle

setParagraphStyle("style" [, "name"])

Apply the named paragraph "style" to the object named "name". If object name is not provided, style is applied on current object selection. If multiple objects are selected or if selected object has no text selection, style is applied on selected objects. Otherwise style is applied to the current text selection.