gimp/app/text
Jehan c5f9b8e190 Issue #5530: do not fail font loading on broken user/GIMP fonts.conf.
Additionally to loading the default fontconfig configuration file, GIMP
also looks up /etc/gimp/<version>/fonts.conf and
$XDG_CONFIG_HOME/GIMP/<version>/fonts.conf (or equivalent in other
OSes). If these don't exist (which is the most common case), this is not
considered a bug. Fontconfig had a regression bug of
FcConfigParseAndLoad() in 2.13.92, which was fixed in a later commit:
fcada52291
As a consequence of this bug, font loading failed in Windows when these
non-mandatory files were absent.

The current commit, originally proposed by Jacob Boerema (@Wormnest) and
slightly reviewed works around the issue, because anyway there is never
any reason why failing to load these files should break font loading as
a general rule. Even if these files exist and are broken (wrong syntax
or whatnot), we should just output some warning on stderr and continue
loading without these additional confs.
With fontconfig 2.13.92, warnings will be also outputted (wrongly), but
at least it won't block loading anymore.

Also let's unref() the `config` object even when the whole font loading
succeeds. Man of FcConfigSetCurrent() clearly says that the reference
count of config is incremented since 2.12.0 (our current minimum
fontconfig is 2.12.4) so let's not leak one reference.
2020-08-16 18:06:09 +02:00
..
.gitignore enums: add intermediate generated enum files to .gitignore 2017-08-24 15:35:27 -04:00
Makefile.am app: remove all old font management code, switch to GimpFontFactory[View] 2018-06-03 01:27:06 +02:00
gimpfont.c libgimbase: merge gimpparam.h into gimpparamspecs.h 2019-07-31 10:16:21 +02:00
gimpfont.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimpfontfactory.c Issue #5530: do not fail font loading on broken user/GIMP fonts.conf. 2020-08-16 18:06:09 +02:00
gimpfontfactory.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimptext-compat.c Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimptext-compat.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimptext-parasite.c app/text: Fix const warning 2020-05-15 00:26:30 +02:00
gimptext-parasite.h app/text: Fix const warning 2020-05-15 00:26:30 +02:00
gimptext-vectors.c Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimptext-vectors.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimptext-xlfd.c Use g_strlcpy() instead of strncpy() everywhere 2019-08-14 23:52:38 +02:00
gimptext-xlfd.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimptext.c Cleanup GObject signal marshallers 2020-04-01 21:20:01 +00:00
gimptext.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimptextlayer-transform.c Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimptextlayer-transform.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimptextlayer-xcf.c Use "Returns:" to annotate return values 2019-08-03 07:53:47 +00:00
gimptextlayer-xcf.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimptextlayer.c Add (nullable) if applicable 2019-08-03 07:53:47 +00:00
gimptextlayer.h Fixed that anchor position of text is shifted when text direction is changed. 2018-08-02 10:29:54 +00:00
gimptextlayout-render.c MR !19: Add support for vertical text writing. 2018-07-30 19:14:49 +02:00
gimptextlayout-render.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimptextlayout.c MR !19: Add support for vertical text writing. 2018-07-30 19:14:49 +02:00
gimptextlayout.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimptextundo.c libgimbase: merge gimpparam.h into gimpparamspecs.h 2019-07-31 10:16:21 +02:00
gimptextundo.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
meson.build app, libgimp*: (meson) fix all the generated `*-enums.c`. 2019-10-19 22:32:29 +02:00
text-enums.c enums: generate enum files in source dir 2017-05-06 17:26:16 -04:00
text-enums.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
text-types.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00