Skip to content

Draft: tools: Set blank font name when text with different fonts is selected

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))

  1. GimpTestStyleEditor detects that font_differs and tries to set font to NULL gimptextstyleeditor.c#L1166
  2. That NULL passed down to gimp_context_set_font_name gimpcontext.c#L3215
  3. Because GIMP can't find font with NULL name it sets current font to some 'Standard' font which is defined in gimpfont.c#L339
  4. If system has only one font starting with "Standard" it gets selected by Text Style Editor automatically
  5. Because Text Style Editor dialog also observes 'font-changed' signal from context it gets notified (because font changed and new font name is "Standard").
  6. 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

Merge request reports

Loading