Bug 397616 - Unintuitive results after scaling vector layer with text using Transform Tool or scaling the image
Summary: Unintuitive results after scaling vector layer with text using Transform Tool...
Status: REPORTED
Alias: None
Product: krita
Classification: Applications
Component: Tool/Text (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: investigated, reproducible, triaged
Depends on:
Blocks:
 
Reported: 2018-08-19 10:59 UTC by Yncke
Modified: 2021-05-30 04:33 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Krita document with two x'es at 12pt but they are not of the same size. (37.18 KB, application/zip)
2021-05-29 12:39 UTC, Yncke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yncke 2018-08-19 10:59:28 UTC
Krita 4.1.1, Windows 7 Professional SP1.

The font size and the document resolution combine in an unintuitive way. (I first noticed this when copy pasting pasting between documents with adjusted print sizes.) The relation between the font size and the way it is represented in the document seems to be different depending on the document resolution at the moment the text was inserted.

How to reproduce:
- create a document at 100ppi
- add some text at 10 pt
- scale image to 100% with 300 ppi with "Adjust print size separately" checked
- add the same text at 10pt

You'll notice that the second text is not the same size as the first one. Editing the text and changing the point size (for example setting them both to 12) will keep this difference.

I'd expect the font size for a font to be the same for all pieces of text that have the same font and the same size.
Comment 1 Emmet O'Neill 2018-09-16 04:49:28 UTC
Yep, I was able to reproduce this bug following the steps described by Yncke.

Creating a 100ppi image, adding 10-point text, scaling the image to 300ppi, and adding another line of 10-point text results in two bodies of text which are set to the same size setting yet are clearly different sizes.

Off the top of my I'm not sure what the fix is here. Maybe adding a qualifier to the point-size of the text that describes it as "10point @ 100ppi" as opposed to "10point @ 300ppi"? As such, changing the pixel density of an image could optionally adjust the pixel density of each body of text, or something like that?

At any rate, bug confirmed.
Comment 2 Dmitry Kazakov 2018-09-27 11:03:44 UTC
HI, Yncke and Emmet!

I have checked your report. I think the text scaling actually works as expected.

When you create a text with 10pt height, Krita creates an object which physical size is expected to be 10 pt, which is 10/72 inch. This physical size is calculated based on the current image resolution, which is 100ppi in your case.

When you change image resolution to 300ppi, the entire vector layer content **is scaled** to look the same in the new resolution, therefore the physical size of the text is not 10pt anymore, but 3.33pt, which is about 0.046 inch.

When you create a new text object with 10pt height, Krita creates the new object, which has physical size of 10pt. It is obviously bigger than the size of the previous text, which was scaled down.

So technically it is not a bug, so I will close the report as "intentional". Though I'm agree that the UIX is not very obvious to the user. If you have any ideas how we can improve that, please either come to discuss that on IRC or on the forum.
Comment 3 Yncke 2018-10-13 16:39:20 UTC
Hello Dmitry,

thank you very much for your detailed answer. I have made a suggestion about it on the IRC channel.
Comment 4 Halla Rempt 2018-10-13 18:18:01 UTC
I think we should re-open this for now.
Comment 5 vanyossi 2019-05-13 14:08:35 UTC
*** Bug 404011 has been marked as a duplicate of this bug. ***
Comment 6 Tiar 2020-09-15 12:40:11 UTC
Ok so since this bug report is mostly about scaling the image + using Transform Tool, let's not mix it with bug 404011 which is about what size text appears on right away. I changed the title, too.
Comment 7 Tyson Tan 2020-09-15 16:33:51 UTC
Hi Tymond, by your request from bug 392473, I can confirm this bug still happens on krita-4.4.0-alpha-69d2027-x86_64.appimage
Comment 8 Dmitry Kazakov 2021-05-21 12:23:10 UTC
Hi, Halla and Yncke !

Can you remember what the suggestions were and why the bug has been reopened? Right now it behaves exactly how it is intended to work.
Comment 9 Dmitry Kazakov 2021-05-21 12:24:15 UTC
Changing to needsinfo.
Comment 10 Yncke 2021-05-29 12:39:24 UTC
Created attachment 138861 [details]
Krita document with two x'es at 12pt but they are not of the same size.

I think it boiled down to this:

A point for a font is defined at 1/72 of an inch. So when adjusting the document size without changing the pixels, the font size should be changed to compensate. 

When looking at other products, I couldn't find anything along those lines in Scribus, but a friend with PhotoShop CS2 did a test, and it showed that when you adjusted the print size, the font size was adjusted as well. (So a text with a font at 12 pt on a 10 inch document at 100 ppi, became a 24pt font when the document was converted to a 20 inch document at 100 ppi.)

Still reproducible in Krita 4.4.3 (appimage, Debian 10). The attachment was made by creating a 100x100 100ppi document, adding an x at 12 pt, scaling it to 100x100 200ppi and adding a second x. Both x'es mention they're 12pt, but they are not of the same size.
Comment 11 Bug Janitor Service 2021-05-30 04:33:38 UTC
Thanks for your comment!

Automatically switching the status of this bug to REPORTED so that the KDE team
knows that the bug is ready to get confirmed.

In the future you may also do this yourself when providing needed information.