Re: Scripter setFontFeatures usage

Victor / tokiop <[email protected]>
Newsgroups gmane.comp.graphics.scribus
Message-ID <[email protected]>
Le 23/02/2020 à 19:59, Peter Nermander a écrit :
>>
>> setFontFeatures("bold")
>>
>>
> I don't know for sure, but I have a slight memory of an older discussion
> about font features and I don't think they can be addressed by name, but
> need to be addressed by a number (it may even be font specific).
> 
> I think the discussion I remember was more about "This font has features
> with numbers xx, yy and zz, how can I know what they mean?"

Thanks Peter ! I didn't manager to make it work using numbers either, or find more information.

Inspecting the .sla I noticed that when underlining from the story editor, the produced xml is :

<ITEXT CH="S"/>
<ITEXT FEATURES="inherit underline" CH="crib"/>
<ITEXT CH="us"/>

But Trying to replicate the same from script :

selectText(1,4)
setFontFeatures("inherit underline")

Produces this xml :

<ITEXT CH="S"/>
<ITEXT FONTFEATURES="inherit underline" CH="crib"/>
<ITEXT CH="us"/>


The scripter function setFontFeatures() seems to work, but uses a FONTFEATURES attribute versus FEATURES for the working / story editor version.

---

As a side note : "bold" doesn't seem to be a valid fontFeature entry. A bold selection is encoded by scribus by switching the font for it's bold variant with FONT="fontName Bold". Adding it manually in the .sla as FEATURES="inherit bold" has no effect.

___
Scribus Mailing List: [email protected]
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.