[HarfBuzz] harfbuzz: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Tue Feb 18 21:55:41 CET 2014


 src/hb-ot-shape-complex-hebrew.cc |    2 +-
 src/hb-ot-shape-private.hh        |    2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit a82165248cddb720576464b8e59a986491d3f2e9
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Feb 18 15:53:56 2014 -0500

    Only do fallback Hebrew composition if no GPOS 'mark' available
    
    Apparently some modern fonts have proper GPOS mark positioning
    tables, but undesirable precomposed forms!  See thread
    "Hebrew composition to presentation forms" and:
    
      http://tex.stackexchange.com/questions/156775/having-trouble-with-vowel-positioning-in-ezra-sil-xelatex
    
    Test case: U+fb1d,05d9,05b4

diff --git a/src/hb-ot-shape-complex-hebrew.cc b/src/hb-ot-shape-complex-hebrew.cc
index efef8c1..6bb6043 100644
--- a/src/hb-ot-shape-complex-hebrew.cc
+++ b/src/hb-ot-shape-complex-hebrew.cc
@@ -70,7 +70,7 @@ compose_hebrew (const hb_ot_shape_normalize_context_t *c,
 
   bool found = c->unicode->compose (a, b, ab);
 
-  if (!found)
+  if (!found && !c->plan->has_mark)
   {
       /* Special-case Hebrew presentation forms that are excluded from
        * standard normalization, but wanted for old fonts. */
diff --git a/src/hb-ot-shape-private.hh b/src/hb-ot-shape-private.hh
index df81fa2..54ac2c3 100644
--- a/src/hb-ot-shape-private.hh
+++ b/src/hb-ot-shape-private.hh
@@ -44,6 +44,7 @@ struct hb_ot_shape_plan_t
   hb_mask_t kern_mask;
   unsigned int has_frac : 1;
   unsigned int has_kern : 1;
+  unsigned int has_mark : 1;
 
   inline void collect_lookups (hb_tag_t table_tag, hb_set_t *lookups) const
   {
@@ -92,6 +93,7 @@ struct hb_ot_shape_planner_t
 
     plan.has_frac = plan.frac_mask || (plan.numr_mask && plan.dnom_mask);
     plan.has_kern = !!plan.kern_mask;
+    plan.has_mark = !!plan.map.get_1_mask (HB_TAG ('m','a','r','k'));
   }
 
   private:


More information about the HarfBuzz mailing list