Using createCharStyle: Difference between revisions

From Scribus Wiki
Jump to navigation Jump to search
(Created page with "Someone asked about the syntax for createCharStyle() on the mail list. The information in the online manual is clearly less than enough to understand how to use this command. My ...")
 
No edit summary
Line 1: Line 1:
Someone asked about the syntax for createCharStyle() on the mail list. The information in the online manual is clearly less than enough to understand how to use this command. My first attempts at making use of it couldn't even get past the traceback message, and the problem with traceback is that it tends to be at best cryptic, and at worst totally unhelpful.
Someone asked about the syntax for createCharStyle() on the mail list. The information in the online manual is clearly less than enough to understand how to use this command. My first attempts at making use of it couldn't even get past the traceback message, and the problem with traceback is that it tends to be at best cryptic, and at worst totally unhelpful.
Here is a slight translation I have done of the command as listed in its synopsis:
<tt>scribus.createCharStyle("name","font",fontsize,"features","fillcolor",fillshade,"strokecolor",strokeshade,baselineoffset, shadowxoffset,shadowyoffset,outlinewidth,underlineoffset,underlinewidth,strikethruoffset,strikethruwidth,scaleh,scalev, tracking,"language")</tt>
What I want to do is take these elements one by one and explain something about each. Notice that each one of these is either in quotes or not. If an element is in quotes, a string is expected and should be in quotes. If there are no quotes, then a numerical value is expected, and mostly a float value is appropriate.

Revision as of 16:34, 2 September 2011

Someone asked about the syntax for createCharStyle() on the mail list. The information in the online manual is clearly less than enough to understand how to use this command. My first attempts at making use of it couldn't even get past the traceback message, and the problem with traceback is that it tends to be at best cryptic, and at worst totally unhelpful.

Here is a slight translation I have done of the command as listed in its synopsis:

scribus.createCharStyle("name","font",fontsize,"features","fillcolor",fillshade,"strokecolor",strokeshade,baselineoffset, shadowxoffset,shadowyoffset,outlinewidth,underlineoffset,underlinewidth,strikethruoffset,strikethruwidth,scaleh,scalev, tracking,"language")

What I want to do is take these elements one by one and explain something about each. Notice that each one of these is either in quotes or not. If an element is in quotes, a string is expected and should be in quotes. If there are no quotes, then a numerical value is expected, and mostly a float value is appropriate.