JDK-8170950 : Text is displayed in bold when fonts are installed into symlinked folder
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 8,9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • Submitted: 2016-12-08
  • Updated: 2018-02-08
  • Resolved: 2017-02-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10 JDK 8 JDK 9
10Fixed 8u121Fixed 9 b158Fixed
Description
When fonts on Linux are installed in a specific way (when path from fontconfig root folder to font file includes a symbolic link), some text is displayed in bold by Java application, even though plain font is requested.

Here are the steps to reproduce the issue on a clean installation of Ubuntu 14.04.4:
1) mkdir ~/fonts
2) Copy attached font files (consola.ttf and consolab.ttf) into ~/fonts
3) cd; ln -s fonts .fonts
4) fc-cache
5) Execute attached program (BoldTest.java)

Expected result: text in first line is displayed in plain font, text in the second line is displayed in bold font

Actual result: text in both lines is displayed in bold font
Comments
The problem is reproducible on 8u112 and 8u92. I didn't check, but most likely it takes place on 8 GA, as well.
30-01-2017

what is introduced in Release? 8u112? Does it affect 8 GA?
30-01-2017

The problem is reproducible on jdk8u and jdk9
26-01-2017

Font files and test case attached
26-01-2017

Initial assignment for review
12-12-2016