darktable
darktable copied to clipboard
Watermark font usage broken on Linux
Describe the bug
Placing custom text with Watermark module sporadically causes font failure. This happens with any font. An error is displayed in the console.
When the failure occurs, the obvious byproduct is that the watermark text is no longer displayed on the image.
Switching to another font makes it work again for a while, then eventually that font also fails.
Steps to reproduce
- Develop a photo.
- Enable Watermark.
- Choose
fixed-size-text - Choose a font.
- Exit develop.
- Repeat on second photo.
- Return to first one.
It does not consistently occur. With repeated use of the Watermark module, with the same font, multiple times, the error occurs in a few minutes.
Expected behavior
Fonts that exist just work.
Logfile | Screenshot | Screencast
(AppRun.wrapped:1397898): Pango-CRITICAL **: 09:59:42.540: pango_font_description_set_size: assertion 'size >= 0' failed
(AppRun.wrapped:1397898): Pango-WARNING **: 09:59:42.540: failed to create cairo scaled font, expect ugly output. the offending font is 'DejaVu Sans'
(AppRun.wrapped:1397898): Pango-WARNING **: 09:59:42.540: font_face status is: error occurred in libfreetype
(AppRun.wrapped:1397898): Pango-WARNING **: 09:59:42.540: scaled_font status is: error occurred in libfreetype
downloaded from www.darktable.org 4.8.1 Linux Debian 12 Intel Iris Xe
Tested two times not issue with a native application (no AppImage). Does that happen with any font or one in particular? You'll probably need to give more information for the people supporting the AppImage build to help.
It fails with any font I choose. I suspect it's not an issue with AppImage because that would cause it to consistently fail, at the beginning.
It doesn't seem to fail on the first image edited. But once additional images are edited with the same font, some of them fail.
Going to a failed image and choosing another font seems to make it work for a little while, then it fails again.
Additional logs, multiple fonts that work the first time then fail:
(AppRun.wrapped:1407657): Pango-WARNING **: 10:45:24.238: failed to create cairo scaled font, expect ugly output. the offending font is 'DejaVu Sans 803603.2783203125'
(AppRun.wrapped:1407657): Pango-WARNING **: 10:45:24.238: font_face status is: error occurred in libfreetype
(AppRun.wrapped:1407657): Pango-WARNING **: 10:45:24.238: scaled_font status is: error occurred in libfreetype
(AppRun.wrapped:1407657): Pango-WARNING **: 10:45:24.239: failed to create cairo scaled font, expect ugly output. the offending font is 'DejaVu Sans 803603.2783203125'
(AppRun.wrapped:1407657): Pango-WARNING **: 10:45:24.239: font_face status is: error occurred in libfreetype
(AppRun.wrapped:1407657): Pango-WARNING **: 10:45:24.239: scaled_font status is: error occurred in libfreetype
(AppRun.wrapped:1407657): Pango-WARNING **: 10:45:24.248: failed to create cairo scaled font, expect ugly output. the offending font is 'DejaVu Sans 1458607.5'
(AppRun.wrapped:1407657): Pango-WARNING **: 10:45:24.248: font_face status is: error occurred in libfreetype
(AppRun.wrapped:1407657): Pango-WARNING **: 10:45:24.248: scaled_font status is: error occurred in libfreetype
(AppRun.wrapped:1407657): Pango-WARNING **: 10:45:24.249: failed to create cairo scaled font, expect ugly output. the offending font is 'DejaVu Sans 1458607.5'
(AppRun.wrapped:1407657): Pango-WARNING **: 10:45:24.249: font_face status is: error occurred in libfreetype
(AppRun.wrapped:1407657): Pango-WARNING **: 10:45:24.249: scaled_font status is: error occurred in libfreetype
(AppRun.wrapped:1407657): Pango-CRITICAL **: 10:45:24.263: pango_font_description_set_size: assertion 'size >= 0' failed
(AppRun.wrapped:1407657): Pango-WARNING **: 10:45:24.263: failed to create cairo scaled font, expect ugly output. the offending font is 'DejaVu Sans'
(AppRun.wrapped:1407657): Pango-WARNING **: 10:45:24.263: font_face status is: error occurred in libfreetype
(AppRun.wrapped:1407657): Pango-WARNING **: 10:45:24.263: scaled_font status is: error occurred in libfreetype
(AppRun.wrapped:1407657): Pango-CRITICAL **: 10:45:24.263: pango_font_description_set_size: assertion 'size >= 0' failed
(AppRun.wrapped:1407657): Pango-WARNING **: 10:45:24.263: failed to create cairo scaled font, expect ugly output. the offending font is 'DejaVu Sans'
(AppRun.wrapped:1407657): Pango-WARNING **: 10:45:24.263: font_face status is: error occurred in libfreetype
(AppRun.wrapped:1407657): Pango-WARNING **: 10:45:24.263: scaled_font status is: error occurred in libfreetype
(AppRun.wrapped:1407657): Pango-WARNING **: 10:45:33.733: failed to create cairo scaled font, expect ugly output. the offending font is 'DejaVu Sans Mono 55152.8564453125'
(AppRun.wrapped:1407657): Pango-WARNING **: 10:45:33.733: font_face status is: error occurred in libfreetype
(AppRun.wrapped:1407657): Pango-WARNING **: 10:45:33.733: scaled_font status is: error occurred in libfreetype
(AppRun.wrapped:1407657): Pango-WARNING **: 10:45:33.733: failed to create cairo scaled font, expect ugly output. the offending font is 'DejaVu Sans Mono 55152.8564453125'
(AppRun.wrapped:1407657): Pango-WARNING **: 10:45:33.733: font_face status is: error occurred in libfreetype
(AppRun.wrapped:1407657): Pango-WARNING **: 10:45:33.733: scaled_font status is: error occurred in libfreetype
(AppRun.wrapped:1407657): Pango-WARNING **: 10:46:20.911: failed to create cairo scaled font, expect ugly output. the offending font is 'DejaVu Sans Mono Bold Oblique 452026.90234375'
(AppRun.wrapped:1407657): Pango-WARNING **: 10:46:20.911: font_face status is: error occurred in libfreetype
(AppRun.wrapped:1407657): Pango-WARNING **: 10:46:20.911: scaled_font status is: error occurred in libfreetype
(AppRun.wrapped:1407657): Pango-WARNING **: 10:46:20.912: failed to create cairo scaled font, expect ugly output. the offending font is 'DejaVu Sans Mono Bold Oblique 452026.90234375'
(AppRun.wrapped:1407657): Pango-WARNING **: 10:46:20.912: font_face status is: error occurred in libfreetype
(AppRun.wrapped:1407657): Pango-WARNING **: 10:46:20.912: scaled_font status is: error occurred in libfreetype
(AppRun.wrapped:1407657): Pango-WARNING **: 10:46:21.001: failed to create cairo scaled font, expect ugly output. the offending font is 'DejaVu Sans Mono Bold Oblique 227070'
(AppRun.wrapped:1407657): Pango-WARNING **: 10:46:21.001: font_face status is: error occurred in libfreetype
(AppRun.wrapped:1407657): Pango-WARNING **: 10:46:21.001: scaled_font status is: error occurred in libfreetype
(AppRun.wrapped:1407657): Pango-WARNING **: 10:46:21.001: failed to create cairo scaled font, expect ugly output. the offending font is 'DejaVu Sans Mono Bold Oblique 227070'
(AppRun.wrapped:1407657): Pango-WARNING **: 10:46:21.001: font_face status is: error occurred in libfreetype
(AppRun.wrapped:1407657): Pango-WARNING **: 10:46:21.001: scaled_font status is: error occurred in libfreetype
(AppRun.wrapped:1407657): Pango-CRITICAL **: 10:46:21.003: pango_font_description_set_size: assertion 'size >= 0' failed
(AppRun.wrapped:1407657): Pango-WARNING **: 10:46:21.003: failed to create cairo scaled font, expect ugly output. the offending font is 'DejaVu Sans Mono Bold Oblique'
(AppRun.wrapped:1407657): Pango-WARNING **: 10:46:21.003: font_face status is: error occurred in libfreetype
(AppRun.wrapped:1407657): Pango-WARNING **: 10:46:21.003: scaled_font status is: error occurred in libfreetype
(AppRun.wrapped:1407657): Pango-CRITICAL **: 10:46:21.003: pango_font_description_set_size: assertion 'size >= 0' failed
(AppRun.wrapped:1407657): Pango-WARNING **: 10:46:21.003: failed to create cairo scaled font, expect ugly output. the offending font is 'DejaVu Sans Mono Bold Oblique'
(AppRun.wrapped:1407657): Pango-WARNING **: 10:46:21.003: font_face status is: error occurred in libfreetype
(AppRun.wrapped:1407657): Pango-WARNING **: 10:46:21.003: scaled_font status is: error occurred in libfreetype
I suspect it's not an issue with AppImage because that would cause it to consistently fail, at the beginning.
Well what I can say is that standard build does not exhibit this issue, so to me this really looks like an AppImage issue.
Well what I can say is that standard build does not exhibit this issue, so to me this really looks like an AppImage issue.
Installed Darktable, non AppImage. Same.
Edit first image. Works fine. Edit second image. Works fine. Edit third image. Failed.
(darktable:1413442): Pango-WARNING **: 11:12:30.361: failed to create cairo scaled font, expect ugly output. the offending font is 'DejaVu Sans Bold 147600.5126953125'
(darktable:1413442): Pango-WARNING **: 11:12:30.361: font_face status is: error occurred in libfreetype
(darktable:1413442): Pango-WARNING **: 11:12:30.361: scaled_font status is: error occurred in libfreetype
(darktable:1413442): Pango-WARNING **: 11:12:30.502: failed to create cairo scaled font, expect ugly output. the offending font is 'DejaVu Sans Bold 288119.955078125'
(darktable:1413442): Pango-WARNING **: 11:12:30.502: font_face status is: error occurred in libfreetype
(darktable:1413442): Pango-WARNING **: 11:12:30.502: scaled_font status is: error occurred in libfreetype
(darktable:1413442): Pango-CRITICAL **: 11:12:30.504: pango_font_description_set_size: assertion 'size >= 0' failed
(darktable:1413442): Pango-WARNING **: 11:12:30.504: failed to create cairo scaled font, expect ugly output. the offending font is 'DejaVu Sans Bold'
(darktable:1413442): Pango-WARNING **: 11:12:30.504: font_face status is: error occurred in libfreetype
(darktable:1413442): Pango-WARNING **: 11:12:30.504: scaled_font status is: error occurred in libfreetype
$ apt show darktable
Package: darktable
Version: 4.8.1-1.1+81.1
Priority: optional
Section: graphics
Maintainer: Debian PhotoTools Maintainers <[email protected]>
Installed-Size: 33.9 MB
Depends: libc6 (>= 2.35), libcairo2 (>= 1.14.0), libcolord-gtk1 (>= 0.1.20), libcolord2 (>= 1.4.3), libcups2 (>= 1.7.0), libcurl3-gnutls (>= 7.56.1), libexiv2-27 (>= 0.27.5), libgcc-s1 (>= 3.0), libgdk-pixbuf-2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.55.1), libgmic1, libgomp1 (>= 6), libgphoto2-6 (>= 2.5.10), libgphoto2-port12 (>= 2.5.10), libgraphicsmagick-q16-3 (>= 1.4+really1.3.35), libgtk-3-0 (>= 3.24.5), libheif1 (>= 1.13.0), libicu72 (>= 72.1~rc-1~), libimath-3-1-29 (>= 3.1.6), libjpeg62-turbo (>= 1.3.1), libjson-glib-1.0-0 (>= 1.5.2), libjxl0.7 (>= 0.7.0), liblcms2-2 (>= 2.8), liblensfun1 (>= 0.3.3), liblua5.4-0 (>= 5.4.4), libopenexr-3-1-30 (>= 3.1.5), libopenjp2-7 (>= 2.2.0), libosmgpsmap-1.0-1 (>= 1.1.0), libpango-1.0-0 (>= 1.37.2), libpangocairo-1.0-0 (>= 1.14.0), libpng16-16 (>= 1.6.2-1), libportmidi0, libpugixml1v5 (>= 1.6), librsvg2-2 (>= 2.52.5), libsdl2-2.0-0 (>= 2.0.12), libsecret-1-0 (>= 0.7), libsqlite3-0 (>= 3.7.10), libstdc++6 (>= 11), libtiff6 (>= 4.0.3), libwebp7 (>= 1.2.4), libwebpmux3 (>= 1.2.4), libx11-6, libxml2 (>= 2.7.4), libxrandr2 (>= 2:1.2.99.3), zlib1g (>= 1:1.2.0), libjs-prototype, libjs-scriptaculous, fonts-roboto, iso-codes
Breaks: darktable-plugins-experimental (<< 1.0~), darktable-plugins-legacy (<< 0.9)
Replaces: darktable-plugins-experimental (<< 1.0~), darktable-plugins-legacy (<< 0.9)
Homepage: http://www.darktable.org/
Download-Size: 6,418 kB
APT-Manual-Installed: yes
APT-Sources: http://download.opensuse.org/repositories/graphics:/darktable/Debian_12 Packages
Tried with current master 4.9.0+692~gf40b1c8d08 and fresh .config for about 10 minutes with 5 different images and several different fonts. Cannot reproduce on Ubuntu 24.04.
Here is a video of the issue in action. Using release version of darktable, 4.8.1, non AppImage on Debian 12. Screencap did not capture my mouse cursor but it should be pretty obvious where I was clicking.
Screencast from 2024-10-04 10-36-47.webm
Note how fonts work at first, then fail afterwards, with resulting console error messages. Note how once a font has failed, other fonts still work. But the fonts that failed no longer work if tried again.
This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.
I am also having problems like above. Ubuntu 22.04.5 Core i7 32Gb ram Appimage 5.0.0 My problem is with the "simple text (avg)" Watermark option. Font size goes massive even at 1%. Or disappears. Problem comes and goes, e.g. just now closing DT and restarting fixed it. Changing font can fix it but not always.
./Desktop/Darktable-5.0.0-x86_64.AppImage Gtk-Message: 18:51:44.841: Failed to load module "canberra-gtk-module" Gtk-Message: 18:51:44.843: Failed to load module "canberra-gtk-module"
(darktable:3326): Pango-WARNING **: 18:56:28.847: failed to create cairo scaled font, expect ugly output. the offending font is 'DejaVu Sans 67083.0712890625'
(darktable:3326): Pango-WARNING **: 18:56:28.847: font_face status is: error occurred in libfreetype
(darktable:3326): Pango-WARNING **: 18:56:28.847: scaled_font status is: error occurred in libfreetype
(darktable:3326): Pango-WARNING **: 18:56:28.849: failed to create cairo scaled font, expect ugly output. the offending font is 'DejaVu Sans 67083.0712890625'
(darktable:3326): Pango-WARNING **: 18:56:28.849: font_face status is: error occurred in libfreetype
(darktable:3326): Pango-WARNING **: 18:56:28.849: scaled_font status is: error occurred in libfreetype
(darktable:3326): Pango-CRITICAL **: 18:56:29.055: pango_font_description_set_size: assertion 'size >= 0' failed
This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.