Gimp-Forum.net
Fonts not available in text Tool - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: Installation and usage (https://www.gimp-forum.net/Forum-Installation-and-usage)
+---- Forum: Linux and other Unixen (https://www.gimp-forum.net/Forum-Linux-and-other-Unixen)
+---- Thread: Fonts not available in text Tool (/Thread-Fonts-not-available-in-text-Tool)



Fonts not available in text Tool - Rocket - 01-02-2020

Hello, I have installed gimp 2.10.12 (I have the same problem for 2.10.14) on Linux (Kiss Linux). When
I try to add some text on a picture, I get:


Code:
Due to lack of any fonts, text functionality is not available.


So I can't add text on a picture. On my system I have the following fonts:
  • dejavu
  • liberation
I have run fc-cache, but it didn't help. Fontconfig is installed. I have the following in /var/cache/fontconfig:


Code:
ls -l /var/cache/fontconfig/
total 80
-rw-r--r--    1 root     root         48208 Nov 22 23:35 2c204173d3592afc30a350ed81f64c67-le64.cache-7
-rw-r--r--    1 root     root           168 Nov 22 23:35 3830d5c3ddfd5cd38a049b759396e72e-le64.cache-7
-rw-r--r--    1 root     root           200 Dec 18 20:34 CACHEDIR.TAG
-rw-r--r--    1 root     root           144 Nov 22 23:35 c855463f699352c367813e37f3f70ea7-le64.cache-7
-rw-r--r--    1 root     root         20064 Nov 22 23:35 f6b893a7224233d96cb72fd88691c0b4-le64.cache-7


With fc-list I get:

Code:
/usr/share/fonts/X11/TTF/DejaVuSerif-Italic.ttf: DejaVu Serif:style=Italic
/usr/share/fonts/X11/TTF/DejaVuSansMono.ttf: DejaVu Sans Mono:style=Book
/usr/share/fonts/X11/TTF/DejaVuSansCondensed-Bold.ttf: DejaVu Sans,DejaVu Sans
Condensed:style=Condensed Bold,Bold
/usr/share/fonts/TTF/LiberationSans-Italic.ttf: Liberation Sans:style=Italic
/usr/share/fonts/X11/TTF/DejaVuSans-Bold.ttf: DejaVu Sans:style=Bold
/usr/share/fonts/TTF/LiberationMono-Regular.ttf: Liberation Mono:style=Regular
/usr/share/fonts/X11/TTF/DejaVuSerif-BoldItalic.ttf: DejaVu Serif:style=Bold
Italic
/usr/share/fonts/X11/TTF/DejaVuSansCondensed-Oblique.ttf: DejaVu Sans,DejaVu
Sans Condensed:style=Condensed Oblique,Oblique
/usr/share/fonts/TTF/LiberationSans-Bold.ttf: Liberation Sans:style=Bold
/usr/share/fonts/TTF/LiberationMono-BoldItalic.ttf: Liberation Mono:style=Bold
Italic
/usr/share/fonts/TTF/LiberationSans-Regular.ttf: Liberation Sans:style=Regular
/usr/share/fonts/TTF/LiberationSerif-Bold.ttf: Liberation Serif:style=Bold
/usr/share/fonts/X11/TTF/DejaVuSerifCondensed-BoldItalic.ttf: DejaVu
Serif,DejaVu Serif Condensed:style=Condensed Bold Italic,Bold Italic
/usr/share/fonts/X11/TTF/DejaVuSansMono-Bold.ttf: DejaVu Sans Mono:style=Bold
/usr/share/fonts/X11/TTF/DejaVuSerifCondensed.ttf: DejaVu Serif,DejaVu Serif
Condensed:style=Condensed,Book
/usr/share/fonts/TTF/LiberationMono-Italic.ttf: Liberation Mono:style=Italic
/usr/share/fonts/X11/TTF/DejaVuSerif.ttf: DejaVu Serif:style=Book
/usr/share/fonts/TTF/LiberationSerif-Italic.ttf: Liberation Serif:style=Italic
/usr/share/fonts/X11/TTF/DejaVuMathTeXGyre.ttf: DejaVu Math TeX
Gyre:style=Regular
/usr/share/fonts/TTF/LiberationSans-BoldItalic.ttf: Liberation Sans:style=Bold
Italic
/usr/share/fonts/TTF/LiberationSerif-BoldItalic.ttf: Liberation Serif:style=Bold
Italic
/usr/share/fonts/X11/TTF/DejaVuSans.ttf: DejaVu Sans:style=Book
/usr/share/fonts/TTF/LiberationSerif-Regular.ttf: Liberation Serif:style=Regular
/usr/share/fonts/X11/TTF/DejaVuSans-Oblique.ttf: DejaVu Sans:style=Oblique
/usr/share/fonts/X11/TTF/DejaVuSerifCondensed-Italic.ttf: DejaVu Serif,DejaVu
Serif Condensed:style=Condensed Italic,Italic
/usr/share/fonts/X11/TTF/DejaVuSansMono-Oblique.ttf: DejaVu Sans
Mono:style=Oblique
/usr/share/fonts/X11/TTF/DejaVuSansMono-BoldOblique.ttf: DejaVu Sans
Mono:style=Bold Oblique
/usr/share/fonts/X11/TTF/DejaVuSansCondensed-BoldOblique.ttf: DejaVu Sans,DejaVu
Sans Condensed:style=Condensed Bold Oblique,Bold Oblique
/usr/share/fonts/X11/TTF/DejaVuSansCondensed.ttf: DejaVu Sans,DejaVu Sans
Condensed:style=Condensed,Book
/usr/share/fonts/X11/TTF/DejaVuSans-ExtraLight.ttf: DejaVu Sans,DejaVu Sans
Light:style=ExtraLight
/usr/share/fonts/TTF/LiberationMono-Bold.ttf: Liberation Mono:style=Bold
/usr/share/fonts/X11/TTF/DejaVuSerif-Bold.ttf: DejaVu Serif:style=Bold
/usr/share/fonts/X11/TTF/DejaVuSerifCondensed-Bold.ttf: DejaVu Serif,DejaVu
Serif Condensed:style=Condensed Bold,Bold
/usr/share/fonts/X11/TTF/DejaVuSans-BoldOblique.ttf: DejaVu Sans:style=Bold
Oblique


In Kiss Linux, each package is built from source. Because it isn't packaged, I have created a package. I compiled
gimp with the following:

Code:
./configure \
   --prefix=/usr \
   --libexecdir=/usr/bin \
   --disable-altivec \
   --disable-static \
   --disable-python \
   --disable-nls \
   --without-lcms \
   --without-webkit

make


In Kiss Linux, intltool isn't packaged, so I had to remove everything concerning internationalization from code. My build compiled, but perhaps I removed something
which is needed to add text. I applied the following patches:

- patch to remove intltool dependency
- patch to remove translation directory

As I understand, the dependency glib-networking is only used for documentation. I also remove this dependency.

- patch to remove glib-networking

At start, gimp is a little slow, but all tools I have tested until now works. Perhaps there is a better way to remove internationalization. I have tested other "paint" software, for example
imagemagick and I can add text on a picture without problems. Do somebody has an idea what to check and what could be wrong ?
Thank you!


RE: Fonts not available in text Tool - rich2005 - 01-02-2020

With the best will in the world I do not think you will get far with KISS on this forum. There are linux users here but the chances of another KISS user are slim. What probability of ?
Quote:Do somebody has an idea what to check and what could be wrong ?

A couple of suggestions

If you put font files in the Gimp user profile ~/.config/GIMP/2.10/fonts Do they show in the text tool ?

I assume a flatpack Gimp is out of the question but would an appimage work ? One from here.

https://github.com/aferrero2707/gimp-appimage/releases/ I have tried the 2.10.14-with plugins and it is good. I believe these are derived from Gentoo so might work with your installation.

Otherwise have you tried contacting the KISS team (one person) with the issue.


RE: Fonts not available in text Tool - Ofnuts - 01-02-2020

The fonts are loaded in app/text/gimpfontfactory.c. It appears to use Pango (in other words, it will see the fonts that Pango itself reports). Perhaps there is something in the Pango package that may tell you what fonts Pango sees.


RE: Fonts not available in text Tool - Rocket - 01-02-2020

(01-02-2020, 10:38 AM)rich2005 Wrote: With the best will in the world I do not think you will get far with KISS on this forum. There are linux users here but the chances of another KISS user are slim.

I'm probably the only KISS user here! But my problem is rather with the compilation, it doesn't play a role if it's another distribution.
I will try your suggestions. I have already reported the issue to the KISS community, but probably at the moment I'm the only one using it, because it's not packaged!

(01-02-2020, 11:08 AM)Ofnuts Wrote: The fonts are loaded in app/text/gimpfontfactory.c.  It appears to use Pango (in other words, it will see the fonts that Pango itself reports). Perhaps there is something in the Pango package that may tell you what fonts Pango sees.

Hmm, it could be promising. So I discovered pango-list and pango-view. With pango-list all fonts are displayed, with pango-view I can display a text with a given font. It works on my system.  The next question is: is the file app/text/gimpfontfactory.c compiled and without error? I have to compile gimp again and I'll have a look. I'll report what I will see.


RE: Fonts not available in text Tool - Rocket - 01-02-2020

After checking, app/text/gimpfontfactory.c is compiled.

At the end, I packaged intltool, gettext and glib-networking. At start, there is an error

Code:
Cannot spawn a message bus without a machine-id: Unable to load /var/lib/dbus/machine-id or /etc/machine-id: Failed to open file “/var/lib/dbus/machine-id”: No such file or directory

(gimp:7276): GLib-GObject-CRITICAL **: 22:58:55.935: g_param_spec_internal: assertion 'is_valid_property_name (name)' failed
gimp: fatal error: Segmentation fault

(pagecurl:7287): LibGimpBase-WARNING **: 22:58:55.942: pagecurl: gimp_wire_read(): error
Job 1, 'gimp &' has ended

dbus is not used in KISS, so it's not installed. In order to start gimp, I have to delete the pagecurl plugin. But after that, there is always the same problem. I have tried to add fonts in
.config/GIMP/2.10/fonts, I have given the full permission (777), but the fonts are not found. I'll have a look at the bugs and if nobody has a suggestion, I will probably open a bug.

I prefer the compilation at the moment to have the same build system for all packages, instead of using flatpak or appimage (but to be honest, I don't really know how it works!).


RE: Fonts not available in text Tool - shachter - 08-20-2020

I had the same problem on one of my systems,
where Gimp 2.8 was the version made available
by the package manager.  I tried to solve it by
building my own Gimp from source; that led to
other problems, described in a different posting
to this forum.  I solved my original problem after
noting that I had 2 different versions of fontconfig.so
and that ldconfig was, apparently, preferring the one
that didn't work with Gimp 2.8; all I had to do was
invoke gimp with a LD_LIBRARY_PATH variable that
led to the dynamic linking with the other fontconfig.so.

Your symptoms may have a different cause, and I
make no promises, of course, that what solved the
problem for me will work for you.

    jay at m5 dot chicago dot il dot us