Created attachment 176215 [details] Image showing the problem In Writer, when you add a comment the text inside the comment box does not have the appropriate kerning settings. It seems that the font kerning in the document body is correct whereas in the comment box the kerning is a bit messy. To illustrate the issue, I created an ODT file using Liberation Serif 12pt both in the document text and in the comment text. See the attached image where I highlight some examples where kerning is not correct in the comment box. This issue may seem a minor one at first, however in longer comments the kerning issue stands out and looks unprofessional. Is it possible to use the same kerning settings in the comment box? System info: Version: 7.3.0.0.alpha1+ / LibreOffice Community Build ID: b31e280b3b502ad16ac0ecf2c644a7d040710897 CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: kf5 (cairo+xcb) Locale: pt-BR (pt_BR.UTF-8); UI: en-US Calc: CL
Created attachment 176216 [details] ODT file This is the ODT file that I used to take the screenshot. Try different zoom levels to see how the kerning in the comment box is affected. BTW I used 200% zoom level to take the screenshot I uploaded as example. My screen size is 1080p.
Created attachment 176242 [details] Screenshot I do see difference in kerning, however in different area. Attached screenshots of main text & comment box both on top of each other with transparency enabled for top image.. If you scroll up/down the transparency (sidebar -> properties -> Image deck with the top image select, can see spot the difference easily Screenshots taken at 600% Version: 7.3.0.0.alpha1+ (x64) / LibreOffice Community Build ID: 73334560b2dd2d60ac58d2cc2b1a5295490b03e1 CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win Locale: nl-NL (nl_NL); UI: en-US Calc: CL
Even different size in LibreOffice 3.5.7.2 Build ID: 3215f89-f603614-ab984f2-7348103-1225a5b (difference is even bigger)
@Caolán, given your recent work with text rendering in Writer, could you please give your thoughts on this issue? Why is text rendering inside the Comment box so different to the rendering in the text document? Is it possible to render the text in the comments the same way they're rendered in the document?
What used to happen is covered in the slides of https://events.documentfoundation.org/media/libreoffice-conference-2022/submissions/B87ZBP/resources/LibreOfficeCon-2022-ResolutionI_2TieDK1.odp where writer's text rendering used to do something very different to everything else. For 7.4 I put in the new approach but was pretty conservative and made the new way of doing things "opt in" and only the "main window" of writer was opted in. I think its been reasonable successful, so I've pushed the boat out a little more since then, and with https://cgit.freedesktop.org/libreoffice/core/commit/?id=495922fd4ac07d4b7c16127b222f1d06a2718399 I'm hoping that its more universal. I haven't checked this case yet, but it would be interesting to reexamine with a recent daily build and see what differences might persist.
Created attachment 183545 [details] Sample file (same font size in text and comment) (In reply to Caolán McNamara from comment #5) > I haven't checked this case yet, but it would be interesting to reexamine > with a recent daily build and see what differences might persist. So I built the current master today and the issue with the comments still persist. The rendering of text in the comment box and in the document are very different. Build info: Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: c819aa06069ec3ea4f2f51d26a77f455740b828f CPU threads: 16; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb) Locale: pt-BR (pt_BR.UTF-8); UI: en-US Calc: CL threaded Here is a new sample file. It's very similar to the first one, but now the comment and the document use the same font size (12pt). Notice that the width of the rendered text changes a lot, as well as the spacing between characters.
Created attachment 183546 [details] Comparison of the text rendering (ODG) Here I made a comparison of the rendered document and comment to highlight how different they are. I did it using the same approach as Telesto. I took a screenshot of both the comment and the text and then placed them on top of each other.
looks like there's a bad/different choice of a "reference device" for the editengine in the comment box to do the measurements of text, and its operating at a lower resolution, and so has different numbers, than the one writer is using.
https://gerrit.libreoffice.org/c/core/+/142603 on a quick comparison at 600% looks to do the right thing
Created attachment 183548 [details] Screenshot with the patch applied This screenshot compares the current comment box (top) with the patched comment box (bottom). There's a clear difference in the patched version. It indeed looks like the rendered text.
(In reply to Rafael Lima from comment #10) > Created attachment 183548 [details] > Screenshot with the patch applied > > This screenshot compares the current comment box (top) with the patched > comment box (bottom). > > There's a clear difference in the patched version. It indeed looks like the > rendered text. I'm still noticing kerning issues in the screenshot with patch applied. The spacing between Lo in Lorem isn't OK. The spacing between su in ipsum is off too. I haven't build it myself. So could be a build issue/wrong screenshot etc.
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/34a90a7f56b7009bc95cf1b0a0e258fa0af2d52a Resolves: tdf#145648 use the same reference device for comments as document It will be available in 7.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Created attachment 183562 [details] 180% zoom sidebar 50% opaque on top of main document text wrt same rendering in comment and main document, they appear the same to me when overlaid like in attachment so I think that aspect seems resolved
backport to 7-4 in gerrit as https://gerrit.libreoffice.org/c/core/+/142620
Caolán McNamara committed a patch related to this issue. It has been pushed to "libreoffice-7-4": https://git.libreoffice.org/core/commit/aec60c6d1b4bdd24bfbd55d1b6890e9c7042b489 Resolves: tdf#145648 use the same reference device for comments as document It will be available in 7.4.4. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.