UI doesn't warn user of unsupported fonts
GIMP version: 2.10.14
Operating System: Fedora 31
Package: standard-issue from Fedora base repository
Description of the bug
Typically, when you select a text layer with the text tool, the tool assumes the options (font face, size, etc.) of the existing text in the layer. However, if the layer uses a missing font:
- the text tool mutates the problematic text layer immediately upon focus,
- undoing the step leaves visible mutations (though the xcf will appear unchanged), and
- the undo history menu behaves erratically.
Reproduction
This bug is always reproducible on my system against the "Noto Sans Heavy Condensed" (henceforth NSHC) font.
Reproduction steps:
- Start with a prepared xcf with a text layer using NSHC.
- On a system that does not support NSHC (so in my case, a system without the
google-noto-sans-fonts
package installed), open said xcf in GIMP. - Engage the text tool and either click on the text layer directly or select "edit text on canvas" from the layer menu. This is where the weird behavior manifests:
- The text tool selects the Source Sans PS font, mutating a period and the number 5 in my text layer (looks kinda like Unicode mojibake?). GIMP thinks I've edited the xcf despite my not having typed anything.
- Hitting
Ctrl-Z
to undo will stop GIMP from thinking the file has been mutated (asterisk disappears from window title). But visually, the text layer appears to be rendered using some fallback font that doesn't look like NSHC to me. - The Undo History menu stops working. If I click on "Base image," GIMP forcibly snaps the revision back to the version with the text layer mutation.
This bug goes away when I install google-noto-sans-fonts
and is reproducible when I remove the same.
As a final note, nothing relevant appeared on stdout when I ran tried the reproduction steps running gimp --verbose
.
This report is written in hopes of an enhancement to propagate some kind of warning to the user if an xcf uses unsupported or missing fonts. Thanks for reading.