Bug 163892 - Text with diacritics and Courier New has letters rendered on top of each other
Summary: Text with diacritics and Courier New has letters rendered on top of each other
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3.0.3 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL: https://github.com/harfbuzz/harfbuzz/...
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Font-Rendering Regressions-HarfBuzz
  Show dependency treegraph
 
Reported: 2024-11-14 09:16 UTC by Gabor Kelemen (allotropia)
Modified: 2024-11-17 00:46 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Writer (13.20 KB, application/vnd.oasis.opendocument.text)
2024-11-14 09:16 UTC, Gabor Kelemen (allotropia)
Details
The example file in Writer under Windows (38.88 KB, image/png)
2024-11-14 09:19 UTC, Gabor Kelemen (allotropia)
Details
The example file under Linux, looks as expected (49.84 KB, image/png)
2024-11-14 09:22 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2024-11-14 09:16:54 UTC
Created attachment 197609 [details]
Example file from Writer

In the attached example file some characters with diacritics are rendered correctly with Arial font, but on top of each other with Courier New font.

1. Open attached file
-> letters in second paragraph are on top of each other.

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7713d916e06a8388f849a758f928cbcfded6c0ae
CPU threads: 14; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: default

Seems to have started in:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=8f2dd1df1d6cc94ebbc1149de72bc6d6dffa6533

author	Khaled Hosny <khaledhosny@eglug.org>	2016-11-02 23:52:06 +0200
committer	Khaled Hosny <khaledhosny@eglug.org>	2016-11-03 00:17:06 +0000
commit 8f2dd1df1d6cc94ebbc1149de72bc6d6dffa6533 (patch)
tree db496889434c484a87b13ffcc4650d65e6672129
parent c8be45889217c555e4bec92af838d0524ceba4e0 (diff)
Revert "Revert "Enable the new text layout engine by default""
Comment 1 Gabor Kelemen (allotropia) 2024-11-14 09:19:41 UTC
Created attachment 197610 [details]
The example file in Writer under Windows
Comment 2 Gabor Kelemen (allotropia) 2024-11-14 09:22:30 UTC
Created attachment 197611 [details]
The example file under Linux, looks as expected
Comment 3 Regina Henschel 2024-11-14 11:53:17 UTC
Was OK in version 5.1.6, is broken in 5.3.7.
Comment 4 V Stuart Foote 2024-11-16 14:33:48 UTC
Unicode text string for an Alt+X conversion:

U+0180U+0181U+0182U+0183U+0187U+0188U+018a

These are not 'combining' diacritics, so really weird that switch over to Harfbuzz would be the cause.

The same string converted in other mono-spaced fonts, e.g. Liberation Mono, Libertinus Mono, DejaVu Sans Mono, etc. have no spacing issue--just 'Courier New'

Suggests this is a font metrics issue with 'Courier New', just odd that it would go unreported/unresolved for so long.

Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 8; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 5 V Stuart Foote 2024-11-16 14:42:11 UTC
(In reply to V Stuart Foote from comment #4)
> 
> Suggests this is a font metrics issue with 'Courier New', just odd that it
> would go unreported/unresolved for so long.
> 

Its been reported now.

https://github.com/MicrosoftDocs/typography-issues/issues/1184

And workaround in Harfbuzz looks to be forth coming.

https://github.com/harfbuzz/harfbuzz/issues/4936
Comment 6 V Stuart Foote 2024-11-16 15:14:14 UTC
(In reply to V Stuart Foote from comment #4)
> The same string converted in other mono-spaced fonts, e.g. Liberation Mono,
> Libertinus Mono, DejaVu Sans Mono, etc. have no spacing issue--just 'Courier
> New'

Correction sorry, Libertinus Mono has no coverage of those 'Latin Extended-B' glyphs, and I'd gotten a fallback on the Writer page. But the issue is with Courier New metrics (w/ GDEF defined) as linked.