[HarfBuzz] Harfbuzz Sinhala (si) script support status update
Behdad Esfahbod
behdad at behdad.org
Mon Sep 3 17:27:45 PDT 2012
On 09/03/2012 03:11 AM, Harshula wrote:
> On Wed, 2012-07-25 at 16:49 -0400, Behdad Esfahbod wrote:
>> On 07/25/2012 03:17 PM, Harshula wrote:
>>>
>>> Here are more details about the problem. The new shaper renders කො
>>> (ko) incorrectly with FreeSerif and LKLUG fonts but renders correctly
>>> with Bhashitha font (IIRC, originated from Windows). The old shaper
>>> renders the string correctly using all three fonts.
>>>
>>> String: කො
>>> Unicode Sequence: <U+0D9A,U+0DDC> (consonant + split dependent vowel)
>>>
>>> <U+0DDC> = <U+0DD9><U+0DCF>
>>
>> Ok, that explains. What Uniscribe does for Sinhala follows the Khmer spec,
>> not the Indic spec (which I agree is unfortunate), so, instead of decomposing
>> split matras according to Unicode, it adds the left part, then uses the
>> original code for the rest (right) part of the matra.
>>
>> What it means that it does:
>>
>> <U+0DDC> = <U+0DD9><U+0DDC>
>>
>> Now, if the font has correct positioning for U+0DCF, doing the Unicode way
>> should be enough.
>>
>> The new shaper follows Uniscribe here. You can disable that by removing a
>> few lines from hb-unicode.cc. Just search for DDC. That would make the new
>> shaper match HarfBuzz-old. Though, I consider the fonts broken if they don't
>> work with Uniscribe.
>>
>> So, in this particular case, it may make sense to limit the Uniscribe behavior
>> to the uniscribe-bug-compatibilty mode. Jonathan, what do you think?
>
> I have been considering this conundrum and here are my thoughts:
>
> 1) Ideally any Unicode Sinhala font that 'works' with Uniscribe should
> just 'work' on GNU/Linux.
Correct. That will be the case with new HarfBuzz Indic shaper.
> 2) I tested a few freely (cost) available fonts that used to be or are
> now reference fonts. Two of these work correctly with both the *new* and
> *old* shapers.
It's definitely possible to develop a font that works with both.
> 3) Taking (2) into account, it may be possible for existing GNU/Linux
> fonts to support both the new and old shaper. However, I would have to
> defer that to someone who knows their way around fonts better.
When you find someone who wants to fix the font, let me know and I can tell
them exactly what to do.
> 4) The way Uniscribe has implemented this is a bit unexpected, what
> happens if Uniscribe changes/fixes this? Do we just blindly follow
> Uniscribe?
In absence of any standard, yes. That said, Microsoft has never changed those
kinds of things in a way that would break things.
behdad
> As you can see, I am undecided on what might be the best direction.
>
> cya,
> #
More information about the HarfBuzz
mailing list