Issue #1884 - Incorrect font when export to png

In gimp_layer_convert(), avoid converting the drawable type when
the source and destination color profiles are equal, if otherwise
unnecessary.  Otherwise, text layers get unnecessarily re-rendered
during conversion, and, by extension, during image duplication
(which happens when exporting to any format that requires merging
down the image).  This may cause the text layer to appear
differently in the duplicated image, or even use a different font
if the original font doesn't exist.
This commit is contained in:
Ell 2018-08-01 04:44:36 -04:00
parent f38443f3b0
commit a826a19359
1 changed files with 6 additions and 0 deletions

View File

@ -992,8 +992,14 @@ gimp_layer_convert (GimpItem *item,
if (g_type_is_a (old_type, GIMP_TYPE_LAYER) &&
gimp_image_get_is_color_managed (dest_image))
{
GimpColorProfile *src_profile =
gimp_color_managed_get_color_profile (GIMP_COLOR_MANAGED (item));
dest_profile =
gimp_color_managed_get_color_profile (GIMP_COLOR_MANAGED (dest_image));
if (gimp_color_profile_is_equal (dest_profile, src_profile))
dest_profile = NULL;
}
if (old_base_type != new_base_type ||