[OpenJDK 2D-Dev] RFR: 8143177: Integrate harfbuzz opentype layout engine per JEP 258
philip.race at oracle.com
Wed Nov 18 00:05:33 UTC 2015
Webrev : http://cr.openjdk.java.net/~prr/8143177/
Bug : https://bugs.openjdk.java.net/browse/JDK-8143177
This webrev contains the changes accumulated in the harfbuzz project forest
that migrate JDK from using ICU for opentype font layout to harfbuzz for
The change does not introduce API. It is mostly adding the harfbuzz library.
The ICU library remains there but is no longer the default.
Eventually (not necessarily in 9) it may be removed once we are comfortable
You may select ICU by using -Dsun.font.layoutengine=icu
You may see which layout engine is in use by using
it will print either "Using harfbuzz", or "Using ICU".
The change has no impact on typical Latin script rendering but is a big
for complex scripts and also applies if you select kerning or ligatures
However the latter is only detectable if the font implements support for
By "big advance" I mean that ICU has not been updated to recognise
recent opentype features.
So harfbuzz should fix a number of things but unexpected changes that
should be reported so we can investigate.
To use harfbuzz we invoke its shaper and we provide a way to get jdk
This means that we do not need a different layer depending on whether
freetype or t2k
is used. It also enables some caching in the JDK font layer.
On macosx harfbuzz does not natively read the AAT tables but will invoke
This does mean that an AAT font installed on Linux would not be
this is not a significant issue since AAT fonts are not found other than
The majority of the files in the webrev are harfbuzz itself, changed
only to comply
with JDK whitespace rules. Reviewers should probably concentrate on all
of the rest.
I've listed it so that all those files are at the beginning and you can
ignore all those
that follow that are in the "harfbuzz" directory.
The harfbuzz version used here is 1.0.6 which is the latest source
release (at the time of writing).
We expect to update this to keep reasonably current.
I would like to push this in on Friday, but at the very latest Monday
because of the
upcoming Feature Complete date so there are a couple of days to make small
tweaks for serious problems but there will be plenty of time after
integration to fix
More information about the 2d-dev