Bug 136674 - U+2019 (and U+2018) from DejaVu Sans fonts incorrectly rendered to italics -- Skia Vulkan and raster rendering only, OK with OpenGL and default GDI rendering
Summary: U+2019 (and U+2018) from DejaVu Sans fonts incorrectly rendered to italics --...
Status: RESOLVED DUPLICATE of bug 137122
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.1.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 136658 (view as bug list)
Depends on:
Blocks: Font-Rendering Skia
  Show dependency treegraph
 
Reported: 2020-09-11 17:28 UTC by Dennis Rice
Modified: 2021-02-25 09:54 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Screen shots of what if observed. (167.39 KB, application/vnd.oasis.opendocument.text)
2020-09-11 17:28 UTC, Dennis Rice
Details
clip from attachment 165397 (95.64 KB, image/png)
2020-09-11 18:20 UTC, V Stuart Foote
Details
Screen Shot of character error on screen (79.69 KB, application/vnd.oasis.opendocument.text)
2021-01-17 21:42 UTC, Dennis Rice
Details
Screen Shoot of characters after upgrading to 7.0.4.2 (68.68 KB, application/vnd.oasis.opendocument.text)
2021-01-17 22:08 UTC, Dennis Rice
Details
just the PNG image from attachment 168962 -- issues on 7.0.3.2 build (65.44 KB, image/png)
2021-01-17 22:50 UTC, V Stuart Foote
Details
just the PNG image from attachment 168963 -- issue on 7.0.4.2 (52.76 KB, image/png)
2021-01-17 22:51 UTC, V Stuart Foote
Details
with Skia rendering enabled, select all and change font from DejaVu Serif to DejaVu Sans (8.80 KB, application/vnd.oasis.opendocument.text)
2021-01-18 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 Dennis Rice 2020-09-11 17:28:31 UTC
Created attachment 165397 [details]
Screen shots of what if observed.

When attempting to reply, always got an invalid email address.  Here is the response that I provided:

Unfortunately the following does not show the screen capture images that I made.
If you can provide me with an email to send to I will send the images of what I have taken.



bugzilla-daemon@bugs.documentfoundation.org
	
Thu, Sep 10, 11:00 PM (13 hours ago)
	
to me
BogdanB changed bug 136658
What 	Removed 	Added
Ever confirmed 	  	1
Status 	UNCONFIRMED 	NEEDINFO
CC 	  	buzea.bogdan@libreoffice.org

Comment # 2 on bug 136658 from BogdanB

I can't confirm with
Version: 7.0.1.2
Build ID: 7cbcfc562f6eb6708b5ff7d7397325de9e764452
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (ro_RO.UTF-8); UI: en-US
Calc: threaded

Go to menu Help - Restart in Safe Mode - Factory Settings and Reset.
Why this? Because your LibreOffice 7 installation could have a bad profile, so,
wehn restarting in Factory Settings is just like your computer see for the
first time a LibreOffice instalation and everything should be fine.

I need an info from you if this solved your problem.

You are receiving this mail because:

    You reported the bug.
    You are on the CC list for the bug.

bugzilla-daemon@bugs.documentfoundation.org
	
Sep 10, 2020, 11:00 PM (13 hours ago)
	
to me

Comment # 3 on bug 136658 from BogdanB

In my test I usd English (USA) as the language of the paragraph, it's the same
in your case?...

Dennis Rice <dearroz@gmail.com>
	
12:01 PM (9 minutes ago)
	
to bugzilla-daemon
Thank you for your review and direction.

I restarted Writer in the safe mode and that apparently worked, but when I then closed down LibreOffice and restarted in normal mode it still had the same problem.

I am running build
gerrit.libreoffice.org / core / 7cbcfc562f6eb6708b5ff7d7397325de9e764452
after clicking on the document open help and build number.

Attempted to do a screen shot:
image.png


The bold / italic text is where the problem exists.

I also found a similar problem in a different section of the text but with the same problem:
image.png


When I remove the bold / italic setting the problem disappears.
image.png



Yes, I am using English (USA).

I have been using LibreOffice since it first came out, however many years that may be.  This was an upgrade as indicated by LibreOffice.

I hope this helps.
Dennis Rice <dearroz@gmail.com>
	
12:05 PM (5 minutes ago)
	
to bugzilla-daemon

I had to forward this because when I first hit Send, I got an error message saying the address could not be found.
Comment 1 Dennis Rice 2020-09-11 17:31:08 UTC
Attempted to reply to the message sent to me but got back as undeliverable.  Hope this helps.
Comment 2 Telesto 2020-09-11 17:46:28 UTC
*** Bug 136658 has been marked as a duplicate of this bug. ***
Comment 3 Telesto 2020-09-11 17:52:11 UTC
Go to Tools -> Options -> View -> Is Force Skia Software Rendering checked? If not, please check it & press OK and restart.. 
Open the file again, is the issue still present?

If this is still the case, please save the relevant part (as shown in screenshot) and add it as attachment.
Comment 4 Julien Nabet 2020-09-11 18:20:17 UTC Comment hidden (off-topic)
Comment 5 V Stuart Foote 2020-09-11 18:20:39 UTC
Created attachment 165401 [details]
clip from attachment 165397 [details]

The closing quote U+2019 showing is not from the DejavuSans of the rest of the "Diane's POV:" string.   And, since default autocorrect handling is to substituted  U+0027 with closing U+2019 unclear what is set for the single quote autocorrect.

Have a look at Tools --> AutoCorrect --> AutoCorrect Options on the 'Localized Options' tab.  What is set for the Single Quotes?  And, if you uncheck the 'Replace' box--what happens on the document canvas?
Comment 6 Dennis Rice 2020-09-11 19:35:23 UTC Comment hidden (off-topic)
Comment 7 V Stuart Foote 2020-09-11 19:46:38 UTC Comment hidden (off-topic)
Comment 8 Dennis Rice 2020-09-11 22:12:17 UTC
Go to menu Help - Restart in Safe Mode - Factory Settings and Reset.
Why this? Because your LibreOffice 7 installation could have a bad profile, so,
wehn restarting in Factory Settings is just like your computer see for the
first time a LibreOffice instalation and everything should be fine.

I need an info from you if this solved your problem.

You are receiving this mail because:

    You reported the bug.
    You are on the CC list for the bug.

bugzilla-daemon@bugs.documentfoundation.org
	
Sep 10, 2020, 11:00 PM (13 hours ago)
	
to me

Comment # 3 on bug 136658 from BogdanB

In my test I usd English (USA) as the language of the paragraph, it's the same
in your case?...

Dennis Rice <dearroz@gmail.com>
	
12:01 PM (9 minutes ago)
	
to bugzilla-daemon
Thank you for your review and direction.

I restarted Writer in the safe mode and that apparently worked, but when I then closed down LibreOffice and restarted in normal mode it still had the same problem.

I am running build
gerrit.libreoffice.org / core / 7cbcfc562f6eb6708b5ff7d7397325de9e764452
after clicking on the document open help and build number.

Attempted to do a screenshot:
image.png


The bold / italic text is where the problem exists.

I also found a similar problem in a different section of the text but with the same problem:
image.png


When I remove the bold / italic setting the problem disappears.
image.png



Yes, I am using English (USA).

I have been using LibreOffice since it first came out, however many years that may be.  This was an upgrade as indicated by LibreOffice.

I hope this helps.
Dennis Rice <dearroz@gmail.com>
	
12:05 PM (5 minutes ago)
	
to bugzilla-daemon

I had to forward this because when I first hit Send, I got an error message saying the address could not be found.

[tag] [reply] [−] Comment 1 Dennis Rice 2020-09-11 17:31:08 UTC

Attempted to reply to the message sent to me but got back as undeliverable.  Hope this helps.

[tag] [reply] [−] Comment 2 Telesto 2020-09-11 17:46:28 UTC

*** Bug 136658 has been marked as a duplicate of this bug. ***

[tag] [reply] [−] Comment 3 Telesto 2020-09-11 17:52:11 UTC

Go to Tools -> Options -> View -> Is Force Skia Software Rendering checked? If not, please check it & press OK and restart.. 
Open the file again, is the issue still present?

If this is still the case, please save the relevant part (as shown in screenshot) and add it as attachment.

[tag] [reply] [−] Comment 4 Julien Nabet 2020-09-11 18:20:17 UTC

Dennis: you must respond on the bugtracker by using https://bugs.documentfoundation.org/show_bug.cgi?id=136674# for this bugtracker, not by trying to respond directly to the author of the comment.

[tag] [reply] [−] Comment 5 V Stuart Foote 2020-09-11 18:20:39 UTC

Created attachment 165401 [details]
clip from attachment 165397 [details]

The closing quote U+2019 showing is not from the DejavuSans of the rest of the "Diane's POV:" string.   And, since default autocorrect handling is to substituted  U+0027 with closing U+2019 unclear what is set for the single quote autocorrect.

Have a look at Tools --> AutoCorrect --> AutoCorrect Options on the 'Localized Options' tab.  What is set for the Single Quotes?  And, if you uncheck the 'Replace' box--what happens on the document canvas?
Comment 9 Julien Nabet 2021-01-17 19:30:51 UTC
Dennis: it's difficult to understand your feedback since you seem to quote previous messages.
Please don't respond from your emailer but by going to https://bugs.documentfoundation.org/show_bug.cgi?id=136674# with your browser and put some comment.

Now, could you uninstall completely LO and install last stable one 7.0.4 
+ apply https://wiki.documentfoundation.org/QA/FirstSteps ?
Comment 10 Dennis Rice 2021-01-17 21:42:34 UTC
Created attachment 168962 [details]
Screen Shot of character error on screen

I apologize for any confusion that I have made in the past, hopefully the attached screen shot of my LO simple text demonstrates the problem when both bold and italic are added to the text.

I have learned that when the text is exported to PDF that all appears correctly.

I will upgrade to 7.0.4 as requested.


Dennis Rice
Comment 11 Dennis Rice 2021-01-17 22:08:42 UTC
Created attachment 168963 [details]
Screen Shoot of characters after upgrading to 7.0.4.2

Upgraded to 7.0.4.2 as requested.

The same issue still exists when a character string that includes the " 's " and made bold and italic.

Dennis Rice
Comment 12 V Stuart Foote 2021-01-17 22:50:06 UTC
Created attachment 168965 [details]
just the PNG image from attachment 168962 [details] -- issues on 7.0.3.2 build

let's just have the PNG to look at, no need for the document.
Comment 13 V Stuart Foote 2021-01-17 22:51:47 UTC
Created attachment 168967 [details]
just the PNG image from attachment 168963 [details] -- issue on 7.0.4.2

likewise
Comment 14 V Stuart Foote 2021-01-17 23:16:14 UTC
The synthetic "Italic" applied to DejaVu Sans U+2018 and U+2019 folloowing autocorrection corrupts the glyphs.  Synthetic "Bold" applies without issue.

Version: 7.1.1.0.0+ (x64) / LibreOffice Community
Build ID: b1ee85d5c19466fb65d934491639fd4f2769fe13
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

also recent master

Version: 7.2.0.0.alpha0+ (x64)
Build ID: 9f9798f07f0b56ae474f31ded671cc8da598d244
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 15 Dennis Rice 2021-01-18 01:04:32 UTC
I'm sorry but your comments are beyond me in COMMENT 12 & 13.  I'm not a programmer.  Why do you need a PNG image when I did a screen shot (ALT-PrintScreen) and then pasted that into another writer document in order to show you the effect in order to send it to you.  If you insist on a PNG then I can paste into GIMP to create the PNG and sent that to you, but do not know what the difference would be.

Is there some other issue that I need to do to make the issue more visible to you?  Would enabling the the field codes help?  I think I know how, but if it would help you can give me a little guidance.

You make a comment about using DejaVu Sans, is that the issue and do I need to use a different font?

Please help me provide you with the information that you need.

Dennis Rice
Comment 16 V Stuart Foote 2021-01-18 01:18:07 UTC
(In reply to Dennis Rice from comment #15)

The Bugzilla tracker is web based, so a simple attachment of an image (PNG or JPEG) is sufficient, and much more conveneint.  I merely extracted extracted the PNGs from your ODF text document attachments to make it convenient for anyone else looking at this.

Nothing more needed from you. The issue is with DejaVu Sans font and is confirmed (reproduced) from the QA perspective, up to a dev to decide best way to correct.

Tbanks for taking the time to file the bug!
Comment 17 V Stuart Foote 2021-01-18 02:53:52 UTC
Hmm, can not find a font/font family other than DejaVu that has this issue.

Interestingly DejaVu Math Tex Gyre, DejaVu Sans Light, DejaVu Serif, DejaVu Serif Condensed are all unaffected.  

But each of these are:

DejaVu Sans (ver 2.37),
DejaVu Sans Mono (ver 2.37),
DejaVu Sans Condensed (ver 2.37)

They each have an incorrect rendering in LibreOffice's synthesized italic effect.
Comment 18 V Stuart Foote 2021-01-18 03:10:57 UTC
@László, I don't think this is wrapped up in work on bug 128860 (did not check older builds), but either way something weird is happening with the sythetic italics being applied to DejaVu Sans, which I know you keep an eye on.
Comment 19 Ming Hua 2021-01-18 04:32:46 UTC
(In reply to V Stuart Foote from comment #17)
> But each of these are:
> 
> DejaVu Sans (ver 2.37),
> DejaVu Sans Mono (ver 2.37),
> DejaVu Sans Condensed (ver 2.37)
> 
> They each have an incorrect rendering in LibreOffice's synthesized italic
> effect.
Indeed, I can reproduce the rendering problem with DejaVu Sans font and:
Version: 7.0.4.2 (x64)
Build ID: dcf040e67528d9187c66b2379df5ea4407429775
CPU threads: 2; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win
Locale: zh-CN (zh_CN); UI: en-US
Calc: threaded

However, when I turn off Skia, I can no longer reproduce with:
Version: 7.0.4.2 (x64)
Build ID: dcf040e67528d9187c66b2379df5ea4407429775
CPU threads: 2; OS: Windows 10.0 Build 18363; UI render: default; VCL: win
Locale: zh-CN (zh_CN); UI: en-US
Calc: threaded

...which suggests this is likely a duplicate of bug 137122.

P.S.: When I reproduce the problem, it is a bit different from attachment 168965 [details] and attachment 168967 [details] -- here the simple italic form is also mis-rendered, along with bold-italic.  Regular and simple bold are fine.
Comment 20 V Stuart Foote 2021-01-18 05:02:17 UTC
Created attachment 168977 [details]
with Skia rendering enabled, select all and change font from DejaVu Serif to DejaVu Sans

Ouch, yes this is Skia dependent on Windows. Affecting both Skia Vulkan and raster rendering. No issue default GDI or with HA.

Attaching simple test doc, just select all and changing font from DejaVu Serif to DejaVu Sans.
Comment 21 V Stuart Foote 2021-01-18 05:18:23 UTC
@Luboš, *

Definitely Skia related. Have no issue with default GDI rendering (through current master), nor with OpenGL rendering with a 7.0.4 build that still includes it.

Attachment 168977 [details] is a nice simple reproducer with DejaVu font. 

STR select all and change from DejaVu Serif to DejaVu Sans or DejaVu Sans Condensed.
Comment 22 Ming Hua 2021-01-18 06:01:26 UTC
One more thing: I disagree with Stuart's diagnosis that this is a problem related to LO's *synthetic* italics.

On my system -- which should also apply to everyone else, as DejaVu only has this one form of distribution, and it's also bundled with LO -- DejaVu Sans (same situation with the other two problematic fonts, Sans Mono and Sans Condensed) is represented by four separate TTF files: DejaVuSans.ttf for regular, DejaVuSans-Oblique.ttf for italic, DejaVuSans-Bold.ttf for bold, and DejaVuSans-BoldOblique.ttf for bold-italic.  There should be no reason for LO to synthesize italic forms from the regular forms, instead of just using the italic font directly.
Comment 23 V Stuart Foote 2021-01-18 06:27:23 UTC
(In reply to Ming Hua from comment #22)
> One more thing: I disagree with Stuart's diagnosis that this is a problem
> related to LO's *synthetic* italics.
> 
> On my system -- which should also apply to everyone else, as DejaVu only has
> this one form of distribution, and it's also bundled with LO -- DejaVu Sans
> (same situation with the other two problematic fonts, Sans Mono and Sans
> Condensed) is represented by four separate TTF files: DejaVuSans.ttf for
> regular, DejaVuSans-Oblique.ttf for italic, DejaVuSans-Bold.ttf for bold,
> and DejaVuSans-BoldOblique.ttf for bold-italic.  There should be no reason
> for LO to synthesize italic forms from the regular forms, instead of just
> using the italic font directly.

Oh, that is probably right. I was focusing on the reported issue of OP and pared it down to a nice simple reproducer. However, the DejaVu would have composite font family that might have issues mapping the Oblique/Oblique Bold.  Becomes obvious if I use the Character... dialog to make the font changes rather than the TB.

So is it a Harfbuzz font mishandling, or a Skia rendering issue?
Comment 24 Luboš Luňák 2021-02-25 09:54:12 UTC

*** This bug has been marked as a duplicate of bug 137122 ***