Bug 462138 - Text Tool Kerning Issue for any font size under 5
Summary: Text Tool Kerning Issue for any font size under 5
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tool/Text (other bugs)
Version First Reported In: 5.1.3
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: wolthera
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-22 20:12 UTC by Bogdan Costisor
Modified: 2022-12-08 23:22 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Example of text that doesn't render properly (85.14 KB, image/jpeg)
2022-11-22 20:12 UTC, Bogdan Costisor
Details
Fontsize and kerning with new text layout. (36.00 KB, image/png)
2022-12-08 22:46 UTC, wolthera
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bogdan Costisor 2022-11-22 20:12:41 UTC
Created attachment 153947 [details]
Example of text that doesn't render properly

SUMMARY
***
Any Text Rendered with font size under 5 is not applying correct letter spacing / kerning

***


STEPS TO REPRODUCE
1. Create a Vector layer 
2. Add text with text tool
3. Apply a small font size

OBSERVED RESULT
Some letters have no spacing, or too much spacing

EXPECTED RESULT
Font should be scalable and letter spacing & kerning should be applied uniformly


SOFTWARE/OS VERSIONS
Windows: Windows 10 Pro, version 21H2


ADDITIONAL INFORMATION
Using latest Krita 5.1.3, however I saw this bug back when the new Text tool changes were applied.
Comment 1 wolthera 2022-12-08 22:46:43 UTC
Created attachment 154447 [details]
Fontsize and kerning with new text layout.

Hi,

I've spend some time completely rewriting the text-layout in Krita past year. This rewrite is not yet part of Krita, but we aim to have it in 5.2. This bug seems fixed due to it.

It doesn't seem to me that this is actually a kerning bug, but it may have instead been a bug that is caused by the various interactions between Krita and Qt resulting in the incorrect DPI being used to render the glyphs, which in turn lead to integer and floating point precision problems (basically, the letters that should've been a fraction apart would have much larger or smaller spacing due this). We've more or less sorted those out by virtue of the rewrite, though I'll admit I have not had the chance to see this in action on Windows. I hope when the branch merges, this will be gone for you too!
Comment 2 Bogdan Costisor 2022-12-08 23:22:48 UTC
Hello. Thank you.

I'm a fellow developer working exactly with text rendering, but with DirectX, no idea exactly what QT is... 

I tested this on a 4k monitor (200% scalling) and a Full HD one (100%-150% scalling) and reproduced it so I rulled out any DPI scalling issue.

I also see everyday issues with floating point precision so my initial rough testing might be off. 

Thank you again and I'll let you know after the 5.2 release if it still reproducing.

Thank you for making this amazing app :)