Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1154625

Summary: OpenJDK7 sometimes returns "0" of charWidth.
Product: Red Hat Enterprise Linux 6 Reporter: takahashi.hd
Component: freetypeAssignee: Marek Kašík <mkasik>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.6CC: bgollahe, feborges, jkoten, jprajzne, neugens, pwu, tpelka
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: freetype-2.3.11-17.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-10 21:39:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1271696    
Attachments:
Description Flags
TestProgram and result of RHEL6, RHEL7 none

Description takahashi.hd 2014-10-20 11:08:59 UTC
Created attachment 948503 [details]
TestProgram and result of RHEL6, RHEL7

Description of problem:
charWidth() of RHEL6+OpenJDK7 sometimes returns "0" .

Version-Release number of selected component (if applicable):
java version,1.7.0_71
java vm name,OpenJDK 64-Bit Server VM
java vm version,24.65-b04
os name,Linux
os version,2.6.32-504.el6.x86_64

How reproducible:


Steps to Reproduce:
1.Execute FontMetricsTest4.java

Actual results:
charWidth() sometimes returns "0".

Expected results:
charWidth() DOESN'T return "0".


Additional info:
charWidth() of RHEL7+OpenJDK7 DOESN'T return "0" .
Please see attached "TP&Result.zip"

Comment 2 Mario Torre 2015-09-07 11:50:51 UTC
This seems to be a bug in the font.

On my RHEL 6.7 system, the first font used by this test is:

wqy-zenhei-fonts-0.9.45-3.el6.noarch

In particular:

/usr/share/fonts/wqy-zenhei/wqy-zenhei.ttc

If I update this font with the one shipping with RHEL7 7.1:

wqy-zenhei-fonts-0.9.46-11.el7.noarch

The test program prints the expected results.

Comment 3 Peng Wu 2015-09-14 08:10:30 UTC
Sorry, I installed wqy-zenhei-fonts-0.9.46-11.el7.noarch on RHEL 6.7,
the problem still exists.

Could you provide more details how to fix it by fonts?

Comment 4 Mario Torre 2015-10-09 10:07:43 UTC
(In reply to Peng Wu from comment #3)
> Sorry, I installed wqy-zenhei-fonts-0.9.46-11.el7.noarch on RHEL 6.7,
> the problem still exists.
> 
> Could you provide more details how to fix it by fonts?

Hmm, I tried again on a fresh install and I can reproduce the issue even with the RHEL7 font package... I'm not sure why it worked before to be honest.

I debugged a bit more and it looks like a failure in freetype.

For some reason the attached test case produces a failure while loading the font glyph, the failure is consistent when loading the font at the size "3866.6667f".

The code that loads the glyph is in Java_sun_font_FreetypeFontScaler_getGlyphImageNative (called by
Java_sun_font_FreetypeFontScaler_getGlyphAdvanceNative), where FT_Load_Glyph returns an "invalid outline" error.

I tried installing freetype-2.4.11-10.el7_1.1.src.rpm from RHEL and the test doesn't print 0 anymore.

Comment 5 Mario Torre 2015-10-09 10:09:07 UTC
I'm reassigning this issue to freetype, but, of course, please ping me if I can be of any assistance.

Comment 6 Marek Kašík 2015-10-12 14:34:21 UTC
I've found which commit fixes this issue in freetype. It is this one http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/ChangeLog?id=6c0d8814189ea5cf03de66b31be9542f3ac79db1. There is a problem with computation of size of rasterization buffer size.

Comment 11 errata-xmlrpc 2016-05-10 21:39:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0844.html