Draft: tools: Set blank font name when text with different fonts is selected
requested to merge StanislavGrinkov/gimp:wip/sgrinkov/3104-selecting-text-with-different-fonts-results-in-changing-selected-text-font-to-standard_whatever into master
Text Style Editor floating box and editor. When there was only one font with a name starting with "Standard", selecting a block of text with two or more different fonts caused it to be automatically applied.
Closes: #3104 (closed) (#3104 (closed))
- GimpTestStyleEditor detects that
font_differs
and tries to set font to NULL gimptextstyleeditor.c#L1166 - That NULL passed down to gimp_context_set_font_name gimpcontext.c#L3215
- Because GIMP can't find font with NULL name it sets current font to some 'Standard' font which is defined in gimpfont.c#L339
- If system has only one font starting with "Standard" it gets selected by Text Style Editor automatically
- Because Text Style Editor dialog also observes 'font-changed' signal from context it gets notified (because font changed and new font name is "Standard").
- And as result the new font is applied to the selected text gimptextstyleeditor.c#L681
Fixed by setting blank floating dialog container entry font name when text with different fonts was selected.
Edited by Stanislav Grinkov