[scribus] Setting character style in a Python Script

Julius Cordes julius at julius-cordes.de
Thu Mar 17 23:15:46 UTC 2016


Hi.

It seems that there's no possibility of applying character styles to a 
text selection using the Scripter. I need a function analog to 
`setStyle` that applies a character style to a text selection (similar 
to `setFont`).

A script snippet illustrating how I think how it should work:
~~~~~
import scribus
scribus.createText(40, 40, 90, 50, 'textrahmen')
scribus.setText('Dies ist ein Test-Text.', 'textrahmen')
scribus.selectObject('textrahmen')
scribus.selectText(14, 4, 'textrahmen')
scribus.setCharStyle('testcharstyle')
~~~~~

Is it possible to add a function `setCharStyle` to the next stable 
release of Scribus?

Thanks!
   Julius



More information about the scribus mailing list