mirror of https://github.com/GNOME/gimp.git
![]() One of the big improvement in this commit is that text layers are now much better at space accuracy. They were already space-aware, yet rendered as sRGB u8 only before being converted to the image's space. It means that text layers had the following limitations: * Any color out of sRGB gamut were trimmed. * Precision was always 8-bit (even if the image was high-bit depth). Now GimpTextLayout keeps track of its source space (for RGB and CMYK only, this won't be as easy when we will support more backend, since Cairo has only RGB support for image data) and the image TRC (in case it bypasses the color space's TRB) and it draws within this gamut and space. It means first that we are not limited to sRGB colors; we will draw text main color in the full image gamut, with still 2 remaining limitations: * Unbounded colors are impossible because Pango format (to color text) uses hexadecimal (so even with half/float images, you can't draw out-of-gamut text unfortunately). * Main color precision is still 8-bit, yet a tiny bit better than before as we at least follow TRC (so we avoid some of the precision loss when converting, even though the bit-depth is still the biggest loss). The outline color on the other hand is drawn through Cairo API entirely, in float. This means that the outline color will now be without any precision loss. Note that this depends on CAIRO_FORMAT_RGBA128F which is only available since Cairo 1.17.2 which is not in Debian bookworm (our current baseline for GIMP 3.0). It means that the old precision will still happen with older Cairo version, as determined by #if code at compilation. |
||
---|---|---|
.. | ||
gimpfont.c | ||
gimpfont.h | ||
gimpfontfactory.c | ||
gimpfontfactory.h | ||
gimptext-compat.c | ||
gimptext-compat.h | ||
gimptext-parasite.c | ||
gimptext-parasite.h | ||
gimptext-vectors.c | ||
gimptext-vectors.h | ||
gimptext-xlfd.c | ||
gimptext-xlfd.h | ||
gimptext.c | ||
gimptext.h | ||
gimptextlayer-transform.c | ||
gimptextlayer-transform.h | ||
gimptextlayer-xcf.c | ||
gimptextlayer-xcf.h | ||
gimptextlayer.c | ||
gimptextlayer.h | ||
gimptextlayout-render.c | ||
gimptextlayout-render.h | ||
gimptextlayout.c | ||
gimptextlayout.h | ||
gimptextundo.c | ||
gimptextundo.h | ||
meson.build | ||
text-enums.c | ||
text-enums.h | ||
text-types.h |