Interaction between Old text parameters (from Dock dialog) and New region specific text attributes (from Floating box) is extremely obscure
Update by Bruno (2024/03/01): "A feature, not a bug"
If your issue has been marked as a duplicate, don't be worried. It's possible to you, mere mortal like me, to understand how the (extremely obscure) text tool works this way: the dockable options act like the Default style to new text layers (and can be saved like as you do with any tool), and the floating options overwrite the dockable ones for a specific layer only (and can't be saved).
Submitted by LightningIsMyName
Link to original bug (#631934)
Description
Since we now have a much more advanced text editor than the one present in 2.6, setting the font size, the text color and some more paramters globally using the tool-options dialog is not really good since these do not appear inside the on-canvas editor.
We should make it clear that these are "Default values" which will be overridden by the on-canvas editor, and we should make them appear in the on canvas editor by adding tags around the entire text that specify these. Then, any editing of the text would create inner tags, that will overrid the outer ones if necessary.
Detailed Example (ignoring all the properties except for color): The default color is black, and the text is "Hello World".
At the begining, the inner markup will be
<markup>
Hello World</markup>
And the actual rendered markup will be
<markup>
Hello World</span>``</markup>
And the user now selects a part of the text using the on-canvas editor and makes it green. The inner markup will be:
<markup>
Hell</span>
o World</markup>
And the actual rendered markup will be
<markup>
Hell</span>
o World</span>``</markup>
Now, the user can change the "default" color to red, and then all the parts except for the one that was green'ed will become red - since the inner markup won't change but the outter markup will be:
<markup>
Hell</span>
o World</span>``</markup>
Now, when reseting the style using the clear button on the on-canvas editor, the inner markup will be cleared, and so we'll see only the outer markup generated by the default values.
Now, why go through this complex way? Why not get rid of the old global/default parameters? The answer is backward compatiability - this way we allow all plug-ins that created and manipulated text, to continue to work. Since, if a layer has no markup (that was the state when the old plug-ins were written) then only the outter markup affect the text, and it will affect all of it. So we change the existing functions to operate on the default markup, and introduce new functions to manipulate regions of the text.
Also, currently the rendering of the text inside gimp is done by setting the values from the tool options dialog (the default values) explicitly, and then by setting a markup on top of it. There are some issues with setting a markup after setting some other attributes explicitly - for example when setting the markup after, it will change all the unmarked areas to black and it will ignore the "default" color specified in the tool-options dialog. However, if we set everything using markup then we won't have such bugs, and the current style will appear inside the editors (the editors use a gtktextbuffer which is styled in synchrnization with the markup). Right now, placing your cursor inside unstyled text won't show any attribute value (such as size) even if this was already set in the tool-options dialog.
See also Bug 625273 regarding fixing the differences between the on-canvas editor and the dialog editor.
Version: git master