Bug 395808 - Text shape should support gradient and pattern backgrounds.
Summary: Text shape should support gradient and pattern backgrounds.
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tool/Text (show other bugs)
Version: 4.1.0 beta
Platform: Mint (Ubuntu based) Linux
: NOR wishlist
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
: 396911 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-06-24 07:01 UTC by Subrata Bera
Modified: 2024-01-22 10:40 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
(gdb) (11.01 KB, text/plain)
2018-06-24 09:40 UTC, mvowada
Details
(video example) (188.27 KB, video/mp4)
2018-06-24 09:43 UTC, mvowada
Details
(new video example) (578.44 KB, video/mp4)
2018-06-27 22:11 UTC, mvowada
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Subrata Bera 2018-06-24 07:01:28 UTC
Steps to recreate the issue: Create a new vector layer, add some text, select it with arrow tool, go to tool options, change fill gradient. 

Error:

convertFromSvg. text: "<text>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</text>" styles: "<defs>\n <style>\n  text {\n   font-family:'DejaVu Sans';\n   font-size:9 ;   text-anchor:start;\n  }\n </style>\n</defs>" bounds: QRectF(132.48,219.92 519.84x301.36) ppi: 100
convertFromSvg. text: "<text style=\"font-family:DejaVu Sans; font-size:72pt; font-size-adjust:0.473684; font-weight:600\">\n    <tspan x=\"0\">Cartoon</tspan>\n</text>" styles: "<defs/>" bounds: QRectF(129.48,208.92 339.031x14) ppi: 72
krita.file: WARNING: 'font-size-adjust' SVG attribute is not supported!
krita.lib.flake: "InteractionTool" : action "object_order_raise" conflicts with canvas action "rotate_canvas_right" shortcut: "Ctrl+]"
krita.lib.flake: "InteractionTool" : action "object_order_lower" conflicts with canvas action "rotate_canvas_left" shortcut: "Ctrl+["
SAFE ASSERT (krita): "colorBackground" in file /home/appimage/workspace/Krita_Release_Appimage_Build/krita/libs/flake/text/KoSvgTextChunkShape.cpp, line 887
Aborted (core dumped)
Comment 1 mvowada 2018-06-24 09:40:12 UTC
Created attachment 113534 [details]
(gdb)

Thanks. Confirming, the gdb report is from an appimage so I'm not sure it'll be of some use for devs.
Comment 2 mvowada 2018-06-24 09:43:36 UTC
Created attachment 113535 [details]
(video example)

Apparently it happens only with text, no problems with other vector types.
Comment 3 mvowada 2018-06-24 09:46:03 UTC
(krita-4.2.0-pre-alpha-8ddd75f-x86_64.appimage - Ubuntu 14.04)
Comment 4 mvowada 2018-06-24 10:06:32 UTC
Steps:

    1. "Select Shapes Tool" to select the text bounding box
    2. Tool Options > Fill > Gradient fill
    3. click "Ignore" to skip the "Internal Error"
    4. move the gradient stops on canvas
    5. click "Ignore" twice to skip the "Internal Error"

Actual results: SIGSEGV segmentation fault
Comment 5 Antti Savolainen 2018-06-27 19:11:32 UTC
mvowada, I'm unable to reproduce even with those steps. I never get the Ignore button for the internal error. Am I doing something wrong? https://youtu.be/TNmWxS7ym6I
Comment 6 mvowada 2018-06-27 22:11:32 UTC
Created attachment 113614 [details]
(new video example)

Hi Antti and thanks for checking.

Unfortunately, I'm able to reproduce the SIGSEGV even when using the latest nightly build + fresh configs.

(Checked on Ubuntu 14.04, Unity - krita-4.2.0-pre-alpha-411dc86-x86_64.appimage).
Comment 7 Antti Savolainen 2018-06-29 14:41:33 UTC
Oh, the crash is exclusive to the appimage. I get the same problem on it.
Comment 8 Dmitry Kazakov 2018-10-02 20:21:17 UTC
*** Bug 396911 has been marked as a duplicate of this bug. ***
Comment 9 Halla Rempt 2019-05-09 12:50:00 UTC
Git commit f80b8ae2460066bf59f2cb1309d1f04970477a2d by Boudewijn Rempt.
Committed on 09/05/2019 at 12:48.
Pushed by rempt into branch 'master'.

Change safe assert to warning

Because for users, this is a crash, and it's just something we
haven't implemented yet, not something unexpected.

M  +2    -1    libs/flake/text/KoSvgTextChunkShape.cpp

https://invent.kde.org/kde/krita/commit/f80b8ae2460066bf59f2cb1309d1f04970477a2d
Comment 10 kalia24 2019-09-16 19:34:31 UTC
Confirm on newest build 4.2.6 on Win7 - it doesn't give any error while trying to apply gradient to text, just turns it red, no matter if chosen gradient is a pre-set or custom. Font doesn't matter as well.
Comment 11 Will Stephenson 2021-12-15 08:42:54 UTC
Text gradient background unsupported is still on git b00b0063 on Linux - no crash though.

I noticed this while trying to reproduce #432978 (reported in Feb 2021) - which suggests the crash was not fixed by the 2019 commit f80b8ae2.
Comment 12 Tiar 2024-01-22 10:40:24 UTC
Now both normal and mesh gradients are supported in text as well, while pattern is removed from vector shapes altogether. I think we should close this (I set it to Fixed since the gradients are fixed now).

(The pattern fill kinda worked in previous versions but it was never fully implemented, according to https://bugs.kde.org/show_bug.cgi?id=403140#c2)