Bug 101854 - RENDERING: Poorman's bold not bold on Japanese font on macOS (see comment #13)
Summary: RENDERING: Poorman's bold not bold on Japanese font on macOS (see comment #13)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
4.3.5.2 release
Hardware: All macOS (All)
: high major
Assignee: Not Assigned
URL:
Whiteboard: target:6.3.0 target:6.2.4
Keywords: bibisected, bisected, regression
Depends on:
Blocks: CJK-Japanese
  Show dependency treegraph
 
Reported: 2016-09-02 07:48 UTC by Naruhiko Ogasawara
Modified: 2019-04-30 14:04 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample Writer file using several fonts; MS Mincho, Liberation Sans, Hiragino Gothic, IPA P Gothic, colored red (12.17 KB, application/vnd.oasis.opendocument.text)
2016-09-02 07:48 UTC, Naruhiko Ogasawara
Details
Screenshot. You can see black line surrounding each Japanese text drawn by red color. (146.55 KB, image/png)
2016-09-02 07:51 UTC, Naruhiko Ogasawara
Details
Zoomed in screenshot of black glyph outline with red fill (20.08 KB, image/png)
2016-09-02 15:23 UTC, Alex Thurgood
Details
LO33O screenshot at maximum page zoom (15.10 KB, image/png)
2016-09-02 15:29 UTC, Alex Thurgood
Details
Current rendering and 4.3 line rendering (115.87 KB, image/png)
2016-09-14 20:32 UTC, eisa01
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Naruhiko Ogasawara 2016-09-02 07:48:55 UTC
Created attachment 127116 [details]
Sample Writer file using several fonts; MS Mincho, Liberation Sans, Hiragino Gothic, IPA P Gothic, colored red

The issue is related to #91563.

Under OS X environment (I use Yosemite), poorman's bold feature (e.g., render text as bold when the bold attribute was specified even if the font itself doesn't support bold) doesn't work well, precisely, lines which make font fat around the characters, is painted always black, even each font has the different color.

Steps to reproduce:
* Install IPA P Gothic font in an OS X environment
http://ipafont.ipa.go.jp/ipafont/download.html
(This is a widely used free-licensed font in Japanese)
* Create a new document in Writer
* Select "IPA P Gothic" font
* Type some Japanese text
* Select the text mentioned above, then change color (for example, red)
* Select the text mentioned above, then apply "bold" (with Cmd-B or click icon in toolbar)

Expected:
* The text is changed as bold style with red color.

Actual:
* The text is black-line surrounded red. 


NOTE: 
- Hiragino has no problem because the font support bold face
- In Windows and Linux (Ubuntu), the feature works fine
- Writer, Calc and Impress has same issue.


See attached file "BoldProblem.odt" as testing data and an evidence screenshot.
Comment 1 Naruhiko Ogasawara 2016-09-02 07:51:30 UTC
Created attachment 127117 [details]
Screenshot. You can see black line surrounding each Japanese text drawn by red color.
Comment 2 Alex Thurgood 2016-09-02 15:23:11 UTC
Confirming

Attached screenshot of zoomed in characters showing glyph outline in black which overlays red fill colour.

The font effect preview also displays predominantly as black instead of red if one selects, for example, a character with IPAGothic Bold.

Version: 5.3.0.0.alpha0+
Build ID: 03f576466c9f110fbef8923604908654d59484a6
CPU Threads: 2; OS Version: Mac OS X 10.11.6; UI Render: default; 
Locale: fr-FR (fr.UTF-8); Calc: group
Comment 3 Alex Thurgood 2016-09-02 15:23:53 UTC
Created attachment 127124 [details]
Zoomed in screenshot of black glyph outline with red fill
Comment 4 Alex Thurgood 2016-09-02 15:25:14 UTC
Not sure that this ever worked properly in previous versions ?
Comment 5 Alex Thurgood 2016-09-02 15:28:35 UTC
Actually, on testing with LO3.3.0, the display was far less affected than in today's versions of LO, see screenshot.

In the screenshot, at maximum zoom, one can still see traces of black glyph outline, but they are much thinner and almost invisible, certainly not as huge with current release versions.
Comment 6 Alex Thurgood 2016-09-02 15:29:17 UTC
Created attachment 127126 [details]
LO33O screenshot at maximum page zoom
Comment 7 Alex Thurgood 2016-09-02 15:29:57 UTC
 worse than in earlier version ==>> regression
Comment 8 Alex Thurgood 2016-09-02 15:35:19 UTC
Problem first appears in

Version: 4.3.5.2
Build ID: 3a87456aaa6a95c63eea1c1b3201acedf0751bd5

not present in 

LO 4242

so bibisect range between these two versions.
Comment 9 eisa01 2016-09-14 20:32:32 UTC
Created attachment 127336 [details]
Current rendering and 4.3 line rendering

I bibisected this to commit: https://cgit.freedesktop.org/libreoffice/core/commit/?id=187af9b0c09f6ba57e994a25a756f0994beae7e5
That was reported to fix bug 91563 that prompted the opening of this bug

But, before this commit the text was not bold, it was shown in regular. The first regression must have happened on the 5.0 branch point, as the 4.2-4.3 bibisect repo showed it fine.

I took a screenshot and the black text bold style looks more correct than what was in the 4.3 line.

As such, I guess the best fix would be to fix the bug in this commit?

Eivinds-MacBook-Pro:bibisect-macosx-64-5.1 eivind$ git bisect bad d8463526a5d5a172e3130727c8bbe5c36fb8a1bd is the first bad commit
commit d8463526a5d5a172e3130727c8bbe5c36fb8a1bd
Author: TDF builder <tdf@tb66.local>
Date:   Mon May 25 13:46:24 2015 -0500

    source 187af9b0c09f6ba57e994a25a756f0994beae7e5
    
    source 187af9b0c09f6ba57e994a25a756f0994beae7e5

:040000 040000 75fae688a4ebd268fc53e2c1c33f24d9afa7e79b b6e07f3290cdcd3387d085c21cc4d74d92f890fb M	LibreOffice.app
Eivinds-MacBook-Pro:bibisect-macosx-64-5.1 eivind$ git bisect log
# bad: [11172e488cf90c09164072b8abb50b2b2d343cd4] source 35d929f42b074a75eb344b623ea74e548ca72fb0
# good: [4d33afe3fa6a97e61c5c4134553845fb68de1c64] source ab465b90f6c6da5595393a0ba73f33a1e71a2b65
git bisect start 'master' 'oldest'
# bad: [1c5667f54cf17bac6c21486d227c404c8e1d4a85] source 796b2d6b20e3e9d6ca7f095a49d9b3a54f58645f
git bisect bad 1c5667f54cf17bac6c21486d227c404c8e1d4a85
# bad: [b20628eb2affe10974181b129fd0026fe624e81c] source e544f449eded2738b45de4be13c72b128a16bafe
git bisect bad b20628eb2affe10974181b129fd0026fe624e81c
# bad: [b29efce642b5ea66ec11549ddbe309e1b1a6e5e8] source 1f408db49740f8cc6ba67d72b54f49d2e4fdae9b
git bisect bad b29efce642b5ea66ec11549ddbe309e1b1a6e5e8
# bad: [5191a84d85b85a5c2292584f359b667f1b1e41b5] source 64b33886ef0ba179abafa50e1bfc6f3386488a5b
git bisect bad 5191a84d85b85a5c2292584f359b667f1b1e41b5
# bad: [f9008462581ce7426c6b06c48cdfc2b484e99e64] source c6dfe0545cca8dc5e40864fd90e0ffe0b6182578
git bisect bad f9008462581ce7426c6b06c48cdfc2b484e99e64
# good: [d11ba4adee4dcd67a2ed1e4a285131186b69b46c] source 5b42e32dcf0142b8ea3ffcfc2c7bbf9e4325465f
git bisect good d11ba4adee4dcd67a2ed1e4a285131186b69b46c
# bad: [fdf219056ba07d611535b0f8e5be4392dfd89193] source 5f5e1568710f8a24af9f54be8bf05e30f6f4f66a
git bisect bad fdf219056ba07d611535b0f8e5be4392dfd89193
# bad: [aa75fcb627613d5032e774cc0a8697949d90d1ee] source 4163bde70568d6d5dd7144293484f797e8df9e63
git bisect bad aa75fcb627613d5032e774cc0a8697949d90d1ee
# bad: [2960995ecad650b3883d32920b0c16fc23c28365] source 4dca69d89c95f30cd58a668fd2dc54a8149ab6c8
git bisect bad 2960995ecad650b3883d32920b0c16fc23c28365
# good: [81f497e19c670d0cffc07157a1a38f32aebbcf23] source d1d2a0bb655edc0c6b33ab8be4d6538de47329aa
git bisect good 81f497e19c670d0cffc07157a1a38f32aebbcf23
# bad: [849fa805fe9573922c0d3a91c5bfb9e8ce6be06b] source 27e1a92d3bddf3c3e8595256e67aff006a402b6a
git bisect bad 849fa805fe9573922c0d3a91c5bfb9e8ce6be06b
# bad: [2ccc74297ca1258b5ec51c0b1817e80cfc44e325] source 551c204740a37c8dbc7acd35bc9fe683ade3fe80
git bisect bad 2ccc74297ca1258b5ec51c0b1817e80cfc44e325
# bad: [d8463526a5d5a172e3130727c8bbe5c36fb8a1bd] source 187af9b0c09f6ba57e994a25a756f0994beae7e5
git bisect bad d8463526a5d5a172e3130727c8bbe5c36fb8a1bd
# first bad commit: [d8463526a5d5a172e3130727c8bbe5c36fb8a1bd] source 187af9b0c09f6ba57e994a25a756f0994beae7e5
Comment 10 eisa01 2017-08-26 18:44:57 UTC
Still issues with the font, the supposedly bold text of IPA P Gothic is not bold, but it is now solid red at least

Version: 5.4.0.3
Build ID: 7556cbc6811c9d992f4064ab9287069087d7f62c
CPU threads: 2; OS: Mac OS X 10.12.6; UI render: default; 
Locale: en-US (en_US.UTF-8); Calc: group
Comment 11 Xisco Faulí 2017-09-14 10:32:21 UTC
Bisected keyword is missing ( based on comment 9 )

Regression introduced by.

author	Thorsten Wagner <thorsten.wagner.4@gmail.com>	2015-05-04 23:06:11 (GMT)
committer	Norbert Thiebaud <nthiebaud@gmail.com>	2015-05-24 16:17:31 (GMT)
commit 187af9b0c09f6ba57e994a25a756f0994beae7e5 (patch)
tree 2af12f1cde57d37ee6e4b34e5f79629f05858237
parent d1d2a0bb655edc0c6b33ab8be4d6538de47329aa (diff)
tdf#87373: Bad text spacing on OS X
Adjustments to character positions less than one pixel are ignored.
These adjustments are probably introduced by lossy conversions between
integer based and float based coordinates.

DXArray elements are adjusted to integers avoiding cummulated rounding
differences.

Adding Cc: to Thorsten Wagner
Comment 12 QA Administrators 2018-09-15 03:09:29 UTC Comment hidden (noise)
Comment 13 eisa01 2018-09-24 20:23:45 UTC
This is still present

The text is red, but not rendered in bold, for IPA P Gothic

Version: 6.2.0.0.alpha0+
Build ID: 16a0a64e7ec9c25e991d164f540f8e9edaea99af
CPU threads: 2; OS: Mac OS X 10.13.6; UI render: default; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2018-09-24_06:53:45
Locale: en-US (en_US.UTF-8); Calc: threaded
Comment 14 Commit Notification 2019-04-20 23:02:01 UTC
Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/eb5606511fac2a8ee1af7cc03c12d6c5b16f7c96%5E%21

tdf#101854 Move to CommonSalLayout removed faux bold in macos

It will be available in 6.3.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.
Comment 15 Commit Notification 2019-04-30 14:04:34 UTC
Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/c17588930688b01253434a3d8acb4b9c0c58adf7%5E%21

tdf#101854 Move to CommonSalLayout removed faux bold in macos

It will be available in 6.2.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.