[scribus] Scripter setFontFeatures usage
Gregory Pittman
gpittman at iglou.com
Sun Feb 23 19:38:02 UTC 2020
On 2/23/20 12:20 PM, Victor / tokiop wrote:
> Hi all,
>
> thanks for this great software and continuous improvements.
>
> I'm trying to set font feature on selected characters of a text frame from scripter, using Scribus 1.5.5 AppImage, SVN : 23095, on debian. The setFontFeatures function listed here[1] seems to allow this.
>
> Using these steps as a minimal test :
>
> 1. select a text frame containing text
> 2. run this command from scripter console :
>
> setFontFeatures("bold")
> setTextShade(50)
> setFontSize(30)
>
> The shade and size are applied to the frame's text, but not the font feature.
>
> Is this syntax supposed to work ?
> Is it working for you ?
>
> Thanks for any clues,
> have a nice day!
>
> Victor
>
> [1] here https://wiki.scribus.net/canvas/Automatic_Scripter_Commands_list
Hi Victor,
I don't find any Scripter command setFontFeatures(). As I look at the documentation, when font features are referred to, they're talking about OpenType font features.
I would suggest instead:
setFont("Deja Vu Sans Bold")
setFontSize(30)
setTextShade(50)
Alternatively, you could create and apply a Character Style with createCharStyle() and setCharacterStyle().
Greg
More information about the scribus
mailing list