[OpenJDK 2D-Dev] RFR: 8143177: Integrate harfbuzz opentype layout engine per JEP 258

Vadim Pakhnushev vadim.pakhnushev at oracle.com
Mon Nov 23 17:36:44 UTC 2015


+1

On 23/11/15 20:27, Philip Race wrote:
> Thanks Steven.
>
> Sergey & Vadim: I think I've addressed your concerns .. are we good to 
> push ?
>
> -phil
>
> On 11/23/15, 8:21 AM, Steven Loomis wrote:
>> 3 looks good
>>
>> On 11/22/2015 8:58 AM, Philip Race wrote:
>>>
>>>
>>> On 11/22/15, 4:33 AM, Sergey Bylokhov wrote:
>>>> On 18.11.15 18:09, Sergey Bylokhov wrote:
>>>>> Hi, Phil.
>>>>> Not an expert here, just a few notes:
>>>>>   - Copyright is missing: hb-jdk-font.cc, hb-jdk.h
>>>
>>> hmm. how did I miss that ? Fixed.
>>>>>   - HBShaper.c: Do we need a code at 268? probably we can add some 
>>>>> todo
>>>>> or remove it?
>>>
>>> I deleted the commented out code.
>>> Uploaded http://cr.openjdk.java.net/~prr/8143177.3/
>>> It is unchanged code-wise from the v2.
>>>
>>> -phil.
>>>
>>>>
>>>> same comments about 8143177.2, or it is intended?
>>>>
>>>>>
>>>>> On 18.11.15 3:05, Philip Race wrote:
>>>>>> 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 same.
>>>>>>
>>>>>> 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
>>>>>> with harfbuzz.
>>>>>> You may select ICU by using -Dsun.font.layoutengine=icu
>>>>>>
>>>>>> You may see which layout engine is in use by using
>>>>>> -Dsun.font.layoutengine.verbose=true
>>>>>> it will print either "Using harfbuzz", or "Using ICU".
>>>>>>
>>>>>> The change has no impact on typical Latin script rendering but is 
>>>>>> a big
>>>>>> advance
>>>>>> for complex scripts and also applies if you select kerning or 
>>>>>> ligatures
>>>>>> for Latin.
>>>>>> However the latter is only detectable if the font implements 
>>>>>> support for
>>>>>> these.
>>>>>> 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
>>>>>> look wrong
>>>>>> should be reported so we can investigate.
>>>>>>
>>>>>> To use harfbuzz we invoke its shaper and we provide a way to get jdk
>>>>>> font information.
>>>>>> 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
>>>>>> CoreText.
>>>>>> This does mean that an AAT font installed on Linux would not be
>>>>>> processed but
>>>>>> this is not a significant issue since AAT fonts are not found 
>>>>>> other than
>>>>>> on macosx.
>>>>>>
>>>>>> 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
>>>>>> remaining problems.
>>>>>>
>>>>>> -phil.
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>




More information about the 2d-dev mailing list