[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    [OpenJDK 2D-Dev] Kerning and Ligatures using Layout Engine
From:       devel () thanlwinsoft ! org (Keith Stribley)
Date:       2008-06-25 20:59:33
Message-ID: 4862B1B5.60005 () thanlwinsoft ! org
[Download RAW message or body]

Phil Race wrote:
>
> Here's what the opentype layout engine developer over at the ICU
> project said.
>
> > I'm surprised to read that ICU handles Myanmar correctly. I suppose
> that
> > the default processing must work with the fonts he sites. 
Yes, the fonts have been designed to use the default processing which is
enabled by default in Uniscribe if Complex language support is turned on
in Windows XP SP2 or Vista.
> My quick reading
> > of the description of the Myanmar script in the Unicode 5.0 book
> suggests
> > that it would need more processing. His comment about 'rlig' seems
> to bear
> > this out.
Currently, there is no standard set of OpenType features which have been
defined for Myanmar. It is possible to do the reordering with a sequence
of context ligatures and this is what has been done in the existing
Myanmar Unicode fonts. It is possible that in the future Myanmar
specific OpenType features will be officially defined, in which case
Myanmar specific Layout code could be written to simplify the number of
lookups in the font.

These ligatures are all really required for Myanmar, but different fonts
have chosen to use different features (not just rlig) if they are
currently turned on by default in Uniscribe. Since liga and clig are
turned on by default in ICU when ligature processing is turned on they
work better with it than rlig.

The reason rlig doesn't work is that it isn't defined in the
ligaFeatures define in the top of OpenTypeLayoutEngine.cpp. I tried
adding this in the past with ICU layout and it seemed to work in my test
app.

> >
> > If the presence of marks is inhibiting ligature formation, that
> could be a
> > bug. I'd need to see some specific test cases to know what's going
> on. In
> > general, I would expect it to work. (I did recently fix some bugs
> having to
> > do w/ canonical processing that might  be relevant here...)
I believe it is specific to the way OpenJDK calls ICU. Try the following
in a java editor with DoulosSIL or another font with ffi ligatures. The
ffi ligatures should be enabled on both lines, but are only enabled on
the first until you delete the marks on the second.
fi ffi
fi ffi a??
(I was testing using the notepad demo app tweaked to set the font and
TextAttributes)
>
> So probably taking the up to date ICU layout code into JDK would tell us
> if that's one of these recent fixed bugs. Steven is planning to do that
> but I'm not sure when it'll happen.
> So specific test cases (the text and a reference to the font, and
> an "actual" vs "expected" description) would be better. 
Shall I open a bug for this and attach some screenshots of the rendering?
> But this
> may in part come down to ICU not actually having all the code it needs
> to render Myanmar script.
>
The fonts I'm using work fine with the default features enabled in
Uniscribe and mostly work in Pango. I agree that the fonts could be
simplified if Burmese reordering was handled in a standard manner by the
commonly used layout engines, but for the moment they are being written
to take advantage of features which are enabled by default in common
rendering engines.

Keith



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic