[OpenJDK 2D-Dev]  RFR JDK-8147002:[macosx] Arabic character cannot be rendered on MacOS X
prasanta.sadhukhan at oracle.com
Thu Feb 9 09:08:11 UTC 2017
Please review a fix for an issue which causes arabic character "alef" to
be not rendered in osx for menlo font in italic style.
The issue was actually a regression caused by the fix to JDK-7162125:
[macosx] A font has different behaviour for ligatures depending on its
in which we have added cascaded font list to find the real fonts that
CFont uses, so that there is no need to use "negative" glyph code for
finding the fallback fonts
using the "subsititution"/"fallback" mechanism used by osx code.
However, the above logic of using cascaded font list in CFont does not
take into account of using JRE provided fonts like all those Lucida* ttf
in jdk/lib/fonts/, so
when a glyph (in this intance, arabic 'alef' character) is intended to
be rendered in Menlo font in italic style, osx will not be able to find
the glyph in Menlo-Italic font
and neither in all the cascaded system fonts provided by CoreText, so it
results in empty box.
Before 7162125 fix, the fallback code in
was adding jre/lib/fonts to the fallback list which was causing the
glyph to be found in "LucidaBrightRegular.ttf" font and the glyph was
So, the proposed fix is to add jre provided font "Lucida Sans Regular"
to the cascaded list so that we get the "alef" glyph.
The reason for choosing "Lucida Sans Regular" over "Lucida Bright
Regular" is, because it is the largest font file in jre and has all the
glyph codepoints that no other font in the jre has,
so we will not lose out on any codepoints and will help us in not
getting missing glyph.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the 2d-dev