[HarfBuzz] Fwd: Javanese script in Harfbuzz

Behdad Esfahbod behdad at behdad.org
Wed Jun 26 18:01:55 PDT 2013

On 13-06-14 05:42 PM, R.S. Wihananto wrote:
> Here is the font. It contains simple OpenType substitution using
> 'blwf' and 'pstf' features. virama + consonant -> conjunct. Consonant
> cluster in Javanese script formed like other Brahmic script:
> C1 + virama + C2 -> C1 + conjunctC2.
> The virama is ꧀ U+A9C0. For example: ꦩ꧀ꦧ mba, ꦩ꧀ꦥ mpa.

Two things:

  - The Javanese config was missing in the Indic shaper.  Just fixed that and
pushed out,

  - The way Uniscribe works with new Indic spec, and the way we copy in
HarfBuzz, is that for blwf, pstf, pref etc to define a consonant's position
the feature needs to be applied to H,C with zero context.  Your font instead
has a backtrack context.  You can for example apply the following patch to HB
and your substitution will happen:

diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc
index d3c475b..e65851f 100644
--- a/src/hb-ot-shape-complex-indic.cc
+++ b/src/hb-ot-shape-complex-indic.cc
@@ -560,7 +560,7 @@ consonant_position_from_face (const indic_shape_plan_t *indi
    * 930,94D in 'blwf', not the expected 94D,930 (with new-spec
    * table).  As such, we simply match both sequences.  Seems
    * to work. */
-  bool zero_context = indic_plan->is_old_spec ? false : true;
+  bool zero_context = indic_plan->is_old_spec ? false : false;
   hb_codepoint_t glyphs_r[2] = {glyphs[1], glyphs[0]};

But I think the correct fix would be to remove the contextual lookups from
your font and just leave the ligating lookups.  HarfBuzz taking care of only
applying the feature to post-base glyphs, so you don't need to check the
existence of the first consonant...


> wihananto
> On Fri, Jun 14, 2013 at 3:19 AM, Behdad Esfahbod <behdad at behdad.org> wrote:
>> On 13-06-13 01:16 PM, R.S. Wihananto wrote:
>>> Hi, Behdad and every member!
>>> I'm developing font for Javanese script based on Unicode on
>>> http://sites.google.com/site/jawaunicode. Currently, my font only uses
>>> SIL Graphite for smart shaping.
>>> I see that recent versions of Firefox reorder U+A9BA JAVANESE VOWEL
>>> base letter.
>>> I tried to add OpenType table to my font using VOLT. I set the script
>>> to 'Javanese <java>' and language to 'Default <dflt>'. I added
>>> conjunct formation using 'blwf' and 'pstf' features. I tested the font
>>> in Firefox but the conjunct was not formed. Nothing happened as if the
>>> OpenType table ignored. Is there something wrong with my code or
>>> Javanese script not implemented yet in Harfbuzz?
>> Show me the font and the malfunctioning Unicode sequence, with actual and
>> expected glyphs / output.
>> behdad
>>> BTW, medial RA in Javanese (U+A9BF JAVANESE CONSONANT SIGN CAKRA) also
>>> need reordering too.
>>> Regards,
>>> wihananto
>>> _______________________________________________
>>> HarfBuzz mailing list
>>> HarfBuzz at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/harfbuzz
>> --
>> behdad
>> http://behdad.org/
>> _______________________________________________
>> HarfBuzz mailing list
>> HarfBuzz at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/harfbuzz


More information about the HarfBuzz mailing list