Text Tool Thread

Ok, so I did do some small UI fixes past week, and updated the documentation.

We’re now at the end of phase 2: Rich text editing!

BEFORE WE TALK ABOUT TESTING, LET ME BE ABSOLUTELY CLEAR THAT BEFORE TESTING YOU NEED TO BACK UP YOUR RESOURCES FOLDER, IN PARTICULAR THE RESOURCE CACHE!

Now, this is a little more complex than last time. Because there’s two builds to test. The first build is the nightly. The second is the build from MR 2470. I will explain later in a bit more detail what the difference is. First, let me summarize the work that has been done during phase 2:

Phase 2 Summary

The majority of the Phase 2 work was getting everything in the new Text Properties Docker to work. This is a separate docker from the text tool, because you can also edit texts with the shape selection tool. The buttons in the text tool options will not do anything when editing text, they are, as their description says, for creating new texts only. I will overhaul the text tool options at a later date to make this clearer.

(Similarly, if you have made texts previously with the rich text editor, using Krita 5.2 or older, the editing will not work as expected. There’s an MR with converter functions for these waiting, but it got stuck on UI disagreements)

The text properties use CSS, and thus, CSS inheritance. This means that you can set a property on the paragraph, and any styled text within that paragraph will inherit those values unless they are explicitly overridden. This is a feature I am required to support as a number of SVG/CSS features (notably, relative font units) require inheritance to function correctly.

The shape selection tool will only edit paragraph properties, the text tool can edit both. When properties are set on the current selection, the revert buttons becomes enabled, and will show multiple arrows when the property is mixed over the selection. The revert buttons are organized so you can easily see which properties are being set.

Currently the text properties docker will only show properties that are set or inherited, with the exception of Font Size, Font Family, Font Style and Text Align. You can add properties with the “add property” drop down at the bottom. From early feedback it became clear that list of mentioned properties should be visible by default, as well that some people wanted to always see all properties. To that end, you can configure property visibility with the configure button next to the add property button. You can set the default behaviour to “Always Show” if you prefer all properties to be shown, and configure in detail when which property shows. This is all because the text properties docker has a lot of properties, and this should keep things focused and easy to experiment with.

Finally, there’s style presets. These allow you to store your favourite styles, and eventually I want to make it possible to create texts on basis of a preset. You can create a style preset based on current settings, and double click existing presets to apply its settings over the current settings.

The build differences

As said before there’s two builds to test. The nightlies and MR 2470. The difference in these two is how the split between paragraph and character is handled, and how you set either. (Some small fixes were done today (12th sept), so it might be good to wait a little till the nightlies for those are done.

Krita Next

  • Shape Select Tool edits paragraph properties on all selected text shapes.
  • Text tool edits paragraph properties when there’s no selection.
  • Text tool edits character properties when there is a selection.
  • The Direction property is disabled in the character properties when there’s no selection and invertedly enabled in the paragraph properties.
  • Upsides:
    • There’s only one set of widgets, in theory, which makes style presets a little more straightforward.
  • Downsides:
    • I really don’t like how we’re handling direction.
    • It is very different from how, say, LibreOffice handles text properties.

MR 2470

The main difference here is that paragraph properties will show all properties for the paragraph (including fontsize, etc), while character will only show properties on the character.

  • Shape Select Tool edits paragraph properties on all selected text shapes. Character properties are disabled.
  • Text tool can edit either depending on which tab you’re in. If there’s no selection, the character properties will be edited on a word, similar to LibreOffice.
  • When setting the fill and stroke color with any of the color selectors, no selection means setting it on the paragraph, while any selection sets it on that selection.
  • Style presets will be set on the character when there’s a selection only, on the paragraph otherwise.
  • Upsides:
    • It should be clearer now how the inheritance thing works.
    • Direction property is less convoluted.
    • It is nicer for style presets to be able to combine, say, an alignment, font size, render settings and indentation into one preset.
  • Downsides:
    • The character properties are disabled when shape selection tool is used. This might be very unclear, and I worry it is going to cause frustration.
    • Similarly, there’s no way for us to magically determine whether paragraph or character tab should be visible. Should we have some kind of auto switch here when there’s a selection, or just leave it alone?

Documentation

I have updated docs here: text tool, text properties docker, font families resource, style presets.

I also did, over the past year, write introduction posts about a given set of features:

What I need to know

You can comment on anything in the builds, but if you need a little bit more focus, here’s a list of things I’m looking for answers to:

  • Which of the two builds do you prefer?
  • What should be done when all text is selected with the text tool? Right now it just tries to select the lowest nodes and edit those, but that can have different meanings depending on the text. Should it keep this behaviour? Should it only edit paragraph properties are remove any overridden properties in the selection?
  • Should we have any default style presets? If so, what kind?
  • Style Preset right now adds its properties on top of existing properties. Should it wholesale replace existing properties? Or should there be a special button for that?
  • The order of the properties is currently hard-coded, and was initially vaguely based on preference, but now got muddled up. What order should the properties be in, or rather, which properties do you want to always see at the top?

While you guys test, I will try to work on Text-in-Shape UX. Similarly, once we’re done with the testing phase I will enabled translation string retrieval for QML. I’d been avoiding it to ensure that the translators wouldn’t be translating on shifting sands too much.

9 Likes

First quick test on notebook, Windows 11, 1920x1080 pix display.

Q: Which of the two builds do you prefer?

A: MR 2470

Q: What should be done when all text is selected with the text tool?

A: If “character tab” is active, overwrite any current text settings of the characters. If paragraph tab is active, keep current custom character settings (let have character settings higher prioritiy than paragraph settings). Add a toggle button to change that default behaviour, so that changing a value in pagragraph tab overwrites values previously set in character tab.

Q: Should we have any default style presets? If so, what kind?

A: No, not needed.

Q: Style Preset right now adds its properties on top of existing properties. Should it wholesale replace existing properties? Or should there be a special button for that?

A: A button please.

Q: The order of the properties is currently hard-coded

A: No opinion yet

Additional notes:

The font selection list seems to be fixed size and only shows two fonts at a time.

I would be nice if it could show as many fonts as possible at once (maybe open as an additional column going from top to bottom of the screen.

A setting for changing the preview fontsize and text would be nice to have.

The scrolbar is so tiny that it is difficult to use (see red circle).

The alignment is weird.

It seems to align the text but also moves the text box. I would expect it to only align the text but not move the box.

The justify button on the right seems to be non functional.

5 Likes

As of now (2025-10-03), the text tool in the latest Krita has several major usability road blocks for me:

  1. The font-family drop-down is too small, displaying only 2 fonts at a time. It should show at least 10 for better usability. The font name above the preview and icons below are taking up too much space. Each step of scrolling effectively scrolls 3 lines, and it feels uncontrollable. The scrolling experience also suffers from an inertia-like delay. I prefer the font name and icons displayed to the left of the preview.
  2. There is no option to set line-height, which is essential for multi-line text situations—this is a major limitation.
  3. There is no way to change text color within the text tool options or thed text properties panel. While I can select the text and use the Advanced Color Selector, I cannot use Ctrl + LMB to choose font color, which is crucial.
  4. An inline toolbar on the canvas that manages these properties would be ideal—similar to any word processor, as we all expect.
  5. Nothing in the Text Property panel is translatable. I found no related content in krita.pot.

I understand everything is still a work in progress. However, some of the points I’ve mentioned have been around for quite some time. I’m reporting them here just in case.

4 Likes

The program suddenly became incredibly laggy.
Is it because of the changes with the text tool?
I had to uninstall and revert back to a much older version
of 5.3.0 pre-alpha to work without the lag.

Version affected with the lag : prealpha 5.3.0 build b0e126f
Version I use without lag : prealpha 5.3.0 build 8803eb1

Appreciate the work you’re doing Wolthera! It’s much needed in Krita and one of the few pain points since moving from Photoshop.

1 Like

krita-x64-5.3.0-prealpha-c82f5ae2 portable (2025-10-25), Win 11.

I wanted to try the new text tool, but it seems to be broken.

The font list contains only one font:

It is the font I have set as custom font in Krita’s settings:

Should I report issues like that at all or ignore them? Looking into Merge requests · Graphics / Krita · GitLab it seems the text tool is still under heavy development.

Ok…

I’ve been working on getting text-in-shape/text-on-path to work. All of the functionality is implemented now, but the branch still needs optimizations. I am currently working on type setting mode, but development on that is still early.

In the meanwhile, a bunch of stuff got merged:

  1. The PSD text branch got merged :slight_smile: As noted previously, we can load all fancy features, but we cannot save all of them (only simple text saving is possible), because PSD requires a certain kind of positioning data before it accepts the advanced text data, and I need to sit down and figure out what exact positioning data it needs. Similarly, Krita and PS have fundamentally different text layouts, so I also cannot guarantee text being 100% the same. Krita will ask if you want to load text as a text object or as a paintlayer for this precise reason.
  2. The Rich text editor got removed, with only the SVG source editor remaining. The oncanvas text editor is far more sophisticated than the rich text editor ever was.
  3. The shortcuts that were originally implemented for rich text are now functional with the oncanvas text editor. It’s not every single property that can be configured in the text properties docker, because I right now do not have the time to implement that (though, everything is set up so that implementing new property shortcuts will be a good first contribution, if someone is interested).
  4. The tool options have been overhauled:
    • You now create new texts with either the current values inside the text properties docker or a given style preset.
    • There’s a button to open the text properties docker, so that people who don’t know it exists will be able to find it.
    • There’s a config option on whether you want to paste rich or plain text by default. There’s also two extra shortcuts for pasting either explcitely.
    • There’s a config option to switch between visual and logical mode for bidirectional text.
    • There’s still the two buttons for the glyph palette and the svg source button.
    • Finally, there’s a set of conversion buttons that allows you to convert text from old pre-positioned SVG 1.1 text to inline wrapped or preformatted or back again. There’s also shortcuts for these, even inside the Shape Selection tool, though I haven’t put them inside any menus yet, so you will either need to add them to the toolbar or use the ctrl+enter menu to find them.

I have rebased MR 2470, and would still like feedback on whether it is preferable to the latest. You can download a testing version from gitlab by going here, and selecting the “windows-archive/linux-archive/macos-archive” from the artifacts dropdown:


Yes, this is partially caused by the fact we cannot have popups inside QML that overflow the window. I have a workaround waiting for that, but it’s non-trivial. Probably there won’t be a resizing option before 5.3 because I have an approaching deadline.

Also something that probably won’t be fixed in 5.3. Basically, QML doesn’t have a proper scrollbar, and while within KDE’s kirigami there’s one, that would be a new dependancy, and it’s quite late to add one right now.

I have noted the first down, but for justify, it only works with text-in-shape, which has no UI yet.

“Add property” at the bottom.

Neither will be in 5.3. The fill and stroke got blocked because I was told not to work on it because it would be too big for 5.3. The on canvas menu just was not planned for 5.3 to avoid scope creep. The main issues are design and also because on mobile it would conflict with the mobile text editing menu. The latter might be fixed in qt6.

One minor quibble: As far as I know, only Microsoft Word has implemented an on canvas menu for text.

Yeah, I hadn’t had the time. Halla went and looked at it for me, should work now.

I didn’t touch anything canvas related in those months, so very unlikely.

Thanks!

Please report a bug at bugs.kde.org. What is likely going on is that Krita cannot find the default fonts folder, but I do not have a windows machine, so I cannot immidiately tell what is causing this.

String freeze (my deadline for new features) is in roughly two weeks. Wish me luck.

2 Likes