GNOME Bugzilla – Bug 687505
Text tool: some font names end with additional comma
Last modified: 2018-05-24 13:24:22 UTC
Created attachment 227964 [details] Font name comma bug, gimp 2.8.2 and Word 2007 Some font names ending with an additional comma. In all other applications the font name is correct (no comma). If i open a 2.6-xcf with textfield, and i edit the text, gimp doesn't connect to the correct font, because font name has no comma at the end but gimp says there is only a font with comma at the end on my system. See attached image with Gimp 2.8.2 and Word 2007. Gimp has additional comma. Fonts effected: Arial Rounded MT Bold Bauhaus 93, Bookshelf Symbol 7 Britannic Bold Cooper Black Copperplate Gothic Bold Copperplate Gothic Light Gill Sans Ultra Bold Informal Roman Modern No. 20 Rage italic, Times New Roman Webdings 2 Webdings 3 Windows XP SP3, german
Confirming for GIMP 2.8.2 on Win7 and Mac OS X (native GIMP build). Found this also for Wingdings 2 and Wingdings 3. Setting the importance down to 'Trivial' because this is rather a cosmetic flaw than a real error - nevertheless thank you for your sharp eye ;-) and feel free to report any further bugs you find.
Found the bug : app/text/gimpfontlist.c:129 : name = pango_font_description_to_string (desc); There is a trailing comma at the end of the string if the last word of the list is a valid style option. see : http://developer.gnome.org/pango/stable/pango-Fonts.html#pango-font-description-to-string I am not sure, but I think we have a compatibility problem here since the font names differ from the two last major version of gimp (the terminating comma). If it is the case, this is a real bug, not just a cosmetic flaw.
Created attachment 248860 [details] [review] proposed patch That solves the problem with Aller Light. Please try with other fonts. That solution is a bit naive but should be safe. However, it might reintroduce incompatibilities with files that contain a font with a trailing comma. What do you think ? This bug was solved the same way in Inkscape : https://bugs.launchpad.net/inkscape/+bug/595432
Hi, I just had a look at this patch. I'm not sure it is the nicer fix. I guess the good fix would be to use something better than pango_font_description_to_string() if that existed. But in the meantime, I don't see any better fix for now. This patch has been proposed nearly 3 months before and the original bug still exists on master. Couldn't we push this commit now? :-)
Comment on attachment 248860 [details] [review] proposed patch Putting the previous patch as obselete. The damage is done, so fixing that way will reintroduce incompatibility for the 2.8 serie.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/435.