• This article is in english as non-french speakers asked informations about style management in scribus. During RMLL, I meet a lot of people who are using scribus or are working to improve it (or both) and we spoke about style management in Scribus. It is a point that should really be improve in next scribus version (even if, as far as I know, it is not planed in 1.6 release). In this article, I will only speak about charactere style and paragraphe style, not about local modification of style which is another topic.
    The problem is : When you apply a character style to a word in a paragraph (example : bold). Then, you apply a paragraph style : size font = 16 (instead of 12 by default). You can notice that the word in bold keep a font size of 12. Of course, it is not a correct behaviour. If you ask for information about this issue on IRC, people will answer: This is because even if you don’t change the font size in the character style, the value is 12 so the font size of your word is 12. In fact, if you look into the code, it is a wrong answer. You can also see that it is a wrong answer if you look at the .sla file. The value of 12 is not saved in the style. The only place where the value of 12 is saved is in the default character style.
    So, what happen exactly?
    first, we have to notice that a paragraph style can have character style component. The font size is a good example as it appear in paragraphe style and in character style. So, if you apply a paragraph style and then you apply a character style, the selected text must have 2 character style.
    On the selected word, we expect that the apply order is : default paragraph style -> default character style -> paragraph style -> character style but it is not the case because a letter can have only ONE character style and this character style have a paragraph style (yes, you read correctly in Scribus, it is not a paragraph style which have a character style but the opposite).
    When I saw this, I thought : ok, in this case, when I apply a paragraph style, I just have to check if the value in the character style is a real value. If it is not (it is an inherited value from default character style), I will add the value of the character style I want to apply from paragraph style.
    Not to hard to understand?
    But in fact, all values are inherited value. Some of them inherited from default character style but other inherit from the character style I applied. Why? Because when you create a style and you apply it in two different word. You can’t set the value directly to these word. Otherwise, they will not be updated if you change the character style. And it is the same behaviour when you apply character style from paragraph style.
    In a nutshell, when you apply a paragraph style, all words in the paragraph have an empty character style with the character style of this paragraph style as parent and when you apply character style, you change this parent to the character style you are applying. (character style is stronger than character style from paragraph style).
    by the way, I thing that this empty style is not empty if you apply inline style modification...

    For me, all this problem appear because in scribus now it is not a paragraph style which contain a character style but the opposit. I thought about two solutions : we can enable style to have many parent. In this case we will not have more problem but, as pygmee noticed, user will need to define priority between style. It can be really confusing and I don’t know any programm working in this way.
    The other solution is to change style definiation to make paragraph style owning character style and applying the priority like I defined it previously. In this instance, a word will have his own character style and the character style from his paragraph style. But it may be really hard to do this as it will involved a lot of modification in the scribus code base. First, we will need to redefined how it is apply but also, as there is another character style, we will need to take it into account when we export the textframe to pdf.
    Good luck to the guy which will do this work.