Bug 105580 - Redraw problems when using fonts with long underlengths (see comment 6)
Summary: Redraw problems when using fonts with long underlengths (see comment 6)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2.5.1 release
Hardware: x86-64 (AMD64) All
: medium minor
Assignee: Jonathan Clark
URL:
Whiteboard: target:24.8.0
Keywords: bibisected, regression
Depends on:
Blocks: Font-Rendering
  Show dependency treegraph
 
Reported: 2017-01-28 12:35 UTC by Patrick Schönbach
Modified: 2024-06-10 16:30 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screen before placeholder removal (9.94 KB, image/png)
2017-01-28 12:36 UTC, Patrick Schönbach
Details
Screen after placeholder removal (33.07 KB, image/png)
2017-01-28 12:37 UTC, Patrick Schönbach
Details
Test font "Signatures" (217.75 KB, application/x-font-ttf)
2017-02-03 12:54 UTC, Patrick Schönbach
Details
metrics for the Signatures font used for test font (68.46 KB, image/png)
2017-03-21 05:02 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Schönbach 2017-01-28 12:35:13 UTC
Description:
If a placeholder is formatted with a font that goes beyond the graphical boundaries of the placeholder box, and you replace i.e. remove the placeholder, then screen redrawling is incorrect. See screenshots.

Turning hardware acceleration on or off doesn't change the outcome.

Actual Results:  
Redrawing artifacts left.

Expected Results:
Clean redraw.


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:50.0) Gecko/20100101 Firefox/50.0 Cyberfox/50.0
Comment 1 Patrick Schönbach 2017-01-28 12:36:33 UTC
Created attachment 130734 [details]
Screen before placeholder removal
Comment 2 Patrick Schönbach 2017-01-28 12:37:42 UTC
Created attachment 130735 [details]
Screen after placeholder removal
Comment 3 Buovjaga 2017-02-03 10:26:04 UTC
Please attach an example document with the situation before removing the placeholder.

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the document.
Comment 4 Patrick Schönbach 2017-02-03 11:01:55 UTC
Actually, one does not even need a placeholder. It happens with any font with very long underlengths. 

Unfortunately, the font I use is proprietary, therefor, I can't attach it. Does anyone know a free font with very long underlengths?
Comment 5 Buovjaga 2017-02-03 12:02:18 UTC
(In reply to Patrick Schönbach from comment #4)
> Unfortunately, the font I use is proprietary, therefor, I can't attach it.
> Does anyone know a free font with very long underlengths?

Maybe this: http://www.fontspace.com/jonathan-s-harris/signatures
Here is the promising category: http://www.fontspace.com/category/thin,tall

Could you please test, if you can reproduce the problem with some of those free ones?
Comment 6 Patrick Schönbach 2017-02-03 12:52:25 UTC
Got it. Do the following:

1. Install the attached font "Signatures".

2. Open an empty Writer document.

3. Select font "Signatures", point size 32.

4. Type "gggggggggggg" -> LOWER PART OF LETTERS IS NOT DRAWN.

5. Prees Backspace -> LOWER PART OF LETTERS IS NOT ERASED.
Comment 7 Patrick Schönbach 2017-02-03 12:54:06 UTC
Created attachment 130877 [details]
Test font "Signatures"
Comment 8 Buovjaga 2017-02-03 13:39:22 UTC
(In reply to Patrick Schönbach from comment #6)
> Got it. Do the following:
> 
> 1. Install the attached font "Signatures".
> 
> 2. Open an empty Writer document.
> 
> 3. Select font "Signatures", point size 32.
> 
> 4. Type "gggggggggggg" -> LOWER PART OF LETTERS IS NOT DRAWN.
> 
> 5. Prees Backspace -> LOWER PART OF LETTERS IS NOT ERASED.

Ok, I can reproduce. Step 5. depends on zoom level. Also, the problems disappear after you zoom out or in.

No problem in version 3.6.7.2

Arch Linux 64-bit, KDE Plasma 5
Version: 5.4.0.0.alpha0+
Build ID: b12823aa81003e80372bd89db79bd6ba8e032a95
CPU Threads: 8; OS Version: Linux 4.9; UI Render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on February 1st 2016

Arch Linux 64-bit, KDE Plasma 5
Version: 5.2.5.1
Build ID: 5.2.5-1
CPU Threads: 8; OS Version: Linux 4.9; UI Render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Comment 9 V Stuart Foote 2017-03-21 05:02:01 UTC
Created attachment 132038 [details]
metrics for the Signatures font used for test font

@Khaled, * 

So metrics for the test font here have the WinDescent set different than the hhea Descender and we look to be clipping to the hhea Descender on text entry. 

And, if I set the hhea Descender to match the WinDescent value the glyphs are fully formed on entry to canvas and when rubbed out with back space.

So this is just bad font metrics, right?

But then what is happening when zooming in or out to refresh the canvas? Why are the full glyphs showing on canvas--are different metrics (WinAscent/WinDescent rather than the hhea values) in use when zooming than when entering text?
Comment 10 V Stuart Foote 2017-03-21 05:07:34 UTC
Was testing on Windows 10 Pro 64-bit en-US with
Version: 5.4.0.0.alpha0+
Build ID: f2efe33f71a8c092a19e3a27a85ac9057ebdca64
CPU threads: 8; OS: Windows 6.19; UI render: GL; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-03-18_00:11:52
Locale: en-US (en_US); Calc: CL

and with attachment 130877 [details] test font "Signatures" installed. The screen clip of its font metrics was with Type light (ver 3.2.037) freeware.

=-ref-=
http://cr8software.net/typelight.html
Comment 11 ⁨خالد حسني⁩ 2017-03-21 07:59:43 UTC
I don’t know for sure, but probably we are wrongly clipping on the typographic metrics rather than the clipping ones. Is this Windows/OpenGL only issue?
Comment 12 V Stuart Foote 2017-03-21 12:41:48 UTC
(In reply to Khaled Hosny from comment #11)
> I don’t know for sure, but probably we are wrongly clipping on the
> typographic metrics rather than the clipping ones. Is this Windows/OpenGL
> only issue?

I have only checked on Windows builds thus far, but it behaves the same on canvas with OpenGL, and Default and also without GPU acceleration.

In initial QA confirmation @Buovjaga did show it as affecting Linux builds with default rendering.
Comment 13 QA Administrators 2018-03-22 03:38:42 UTC Comment hidden (obsolete)
Comment 14 Patrick Schönbach 2018-03-22 10:57:52 UTC
Still present in version 6.0.2.1
Comment 15 Buovjaga 2018-06-05 15:01:46 UTC
Windows 5.3 repo blames https://cgit.freedesktop.org/libreoffice/core/commit/?id=34d7602954d4483b3bc9db700e7df2c15348947a

tdf#55469 Consistent line spacing across platforms
Comment 16 QA Administrators 2019-06-06 02:53:03 UTC Comment hidden (obsolete)
Comment 17 QA Administrators 2021-06-06 05:23:52 UTC Comment hidden (obsolete)
Comment 18 Jonathan Clark 2024-06-10 16:30:36 UTC
This bug was fixed as a part of fixing bug 152024, in the following commit:

> https://git.libreoffice.org/core/commit/976b16b1c6ad6e6eaded7a9fb24388c4512e21e2
>
> tdf#152024 Diacritics cut off at top and bottom of paragraph
>
> It will be available in 24.8.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.

Testing manually by following the instructions in comment 6, without the linked patch the bottom part of the 'g' character is truncated, but with the patch the full character is rendered as expected.