[HarfBuzz] harfbuzz-ng: Branch 'master' - 4 commits

Behdad Esfahbod behdad at kemper.freedesktop.org
Thu May 24 10:04:56 PDT 2012


 TODO                                                                                           |   18 
 src/hb-atomic-private.hh                                                                       |    2 
 src/hb-ot-layout-gsub-table.hh                                                                 |   10 
 src/hb-ot-layout-gsubgpos-private.hh                                                           |   23 
 test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/MANIFEST                           |    2 
 test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/diacritics/MANIFEST                |    5 
 test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/diacritics/lam-alef.txt            |   28 
 test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/diacritics/language-arabic.txt     |  695 ++++++++++
 test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/diacritics/language-persian.txt    |   48 
 test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/diacritics/language-urdu.txt       |  188 ++
 test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/diacritics/ligature-diacritics.txt |    1 
 test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/ligature-diacritics.txt            |    1 
 12 files changed, 993 insertions(+), 28 deletions(-)

New commits:
commit cde1c0114ba66a45d907e81a49bf625e0dc946b0
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu May 24 10:46:39 2012 -0400

    Fix hb_atomic_int_set() implementation for HB_NO_MT
    
    As pointed out by Jonathan Kew.

diff --git a/src/hb-atomic-private.hh b/src/hb-atomic-private.hh
index 03d7df1..684e856 100644
--- a/src/hb-atomic-private.hh
+++ b/src/hb-atomic-private.hh
@@ -79,7 +79,7 @@ typedef volatile int hb_atomic_int_t;
 #define HB_ATOMIC_INT_NIL 1
 typedef volatile int hb_atomic_int_t;
 #define hb_atomic_int_add(AI, V)	((AI) += (V), (AI) - (V))
-#define hb_atomic_int_set(AI)		((void) ((AI) = (V)))
+#define hb_atomic_int_set(AI, V)	((void) ((AI) = (V)))
 #define hb_atomic_int_get(AI)		(AI)
 
 #endif
commit 3b9b7133bea787f787170beea073f185e36d2327
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed May 23 22:00:25 2012 -0400

    Update TODO

diff --git a/TODO b/TODO
index 18d730c..168ff9a 100644
--- a/TODO
+++ b/TODO
@@ -1,8 +1,8 @@
 General fixes:
 =============
 
-- Warn at compile time (and runtime with HB_DEBUG?) if no Unicode funcs
-  found / set.
+- Warn at compile time (and runtime with HB_DEBUG?) if no Unicode / font
+  funcs found / set.
 
 - In hb_shape(), assert if direction is INVALID.
 
@@ -26,10 +26,24 @@ General fixes:
 
 - Synthetic GDEF.
 
+- Add Pango backend?
+
+- Add ICUlayout backend?
+
+- Add ICUlayout API?
+
+- Add Old HarfBuzz backend?
+
+- Add Old HarfBuzz API?
+
 
 API issues to fix before 1.0:
 ============================
 
+- Add default font_funcs / Unicode funcs API and to utils.
+
+- Add init_func to font_funcs.  Adjust ft.
+
 - Add pkg-config files for glue codes (harfbuzz-glib, etc)
 
 - Figure out how many .so objects, how to link, etc
commit ff3524c21aabf5d0d6014d1ce1b3e12ca5f0990f
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed May 23 21:50:43 2012 -0400

    Add Arabic diacritics tests

diff --git a/test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/MANIFEST b/test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/MANIFEST
index ff8270e..0ac75c3 100644
--- a/test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/MANIFEST
+++ b/test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/MANIFEST
@@ -1 +1 @@
-ligature-diacritics.txt
+diacritics
diff --git a/test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/diacritics/MANIFEST b/test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/diacritics/MANIFEST
new file mode 100644
index 0000000..df0e4b5
--- /dev/null
+++ b/test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/diacritics/MANIFEST
@@ -0,0 +1,5 @@
+lam-alef.txt
+language-arabic.txt
+language-persian.txt
+language-urdu.txt
+ligature-diacritics.txt
diff --git a/test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/diacritics/lam-alef.txt b/test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/diacritics/lam-alef.txt
new file mode 100644
index 0000000..26f6f7b
--- /dev/null
+++ b/test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/diacritics/lam-alef.txt
@@ -0,0 +1,28 @@
+لًا
+ـلًا
+لاً
+ـلاً
+لّا
+ـلّا
+لاّ
+ـلاّ
+لًّا
+ـلًّا
+لاًّ
+ـلاًّ
+لَّا
+ـلَّا
+لاَّ
+ـلاَّ
+لَا
+ـلَا
+لاَ
+ـلاَ
+لُا
+ـلُا
+لاُ
+ـلاُ
+لِا
+ـلِا
+لاِ
+ـلاِ
diff --git a/test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/diacritics/language-arabic.txt b/test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/diacritics/language-arabic.txt
new file mode 100644
index 0000000..24eb0c9
--- /dev/null
+++ b/test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/diacritics/language-arabic.txt
@@ -0,0 +1,695 @@
+ـيًـ
+ـاً
+يُـ
+ـرً
+ـقًـ
+ـدً
+رً
+رٍ
+ـبًـ
+ـرّ
+مًـ
+ـضًـ
+مُـ
+ـدّ
+ـوّ
+ـمًـ
+ـتًـ
+ـيّـ
+يًـ
+تُـ
+ءً
+دً
+نًـ
+ـمُـ
+ـمّـ
+ةً
+حًـ
+ـوً
+ـحًـ
+ـرِّ
+ـةً
+نٍ
+ـمّ
+فًـ
+ـكّـ
+ـعًـ
+ـصًـ
+اً
+سِـ
+ـيُـ
+قِـ
+ـفًـ
+ـذّ
+ـجّـ
+بًـ
+غًـ
+ـلّـ
+ـصّـ
+ـلّ
+ـدَّ
+ـسِّـ
+ـزً
+وّ
+ـثًـ
+بُـ
+ـغّـ
+خِـ
+ـدِّ
+فٍ
+ـسّـ
+ـنًـ
+عًـ
+ـفّـ
+ـيَّـ
+ـلٍ
+ـطًـ
+ـبّـ
+ـطّـ
+ـجِّـ
+عُـ
+ـيّ
+ـنّـ
+كًـ
+ـلِـ
+ـئًـ
+جًـ
+ـذَّ
+قًـ
+ـنُـ
+ـخّـ
+ـتُـ
+رَ
+كّـ
+طًـ
+نُـ
+رّ
+لٍ
+ـضّـ
+بّـ
+عِـ
+زً
+مِـ
+ـكَّـ
+ـدَ
+ـدٍ
+أُ
+ـمَّـ
+ـأً
+ـرَ
+ـزّ
+حِـ
+Ù…ÙŽÙ€
+ـيِّـ
+ـوَّ
+ـمَـ
+صًـ
+ضًـ
+ـرِ
+
+وُ
+يّ
+ـمِّـ
+ـيًّـ
+ـرَّ
+ـوِّ
+ـكًـ
+رِ
+ـلَّـ
+ـجِـ
+ÙŠÙŽÙ€
+ـجَّـ
+ـاّ
+ـذً
+ـقّـ
+ـغِّـ
+ـخًـ
+ـسَّـ
+ـلٍّ
+ـهًـ
+قّـ
+Ø­ÙŽÙ€
+ـجًـ
+ـفَّـ
+شُـ
+جّـ
+ـهّـ
+سَـ
+ـعّـ
+ـدِ
+دٍ
+رِّ
+ـذٍ
+ـبُّـ
+ـتَـ
+دُ
+ـتُ
+لّ
+سِّـ
+لّـ
+دّ
+دِ
+يٍّ
+جَـ
+نّ
+هَّـ
+ـكِّـ
+ـقِّـ
+ـعُـ
+بَـ
+تَـ
+ـنِّـ
+ـلُّـ
+ـسُـ
+مّـ
+قَّـ
+Ù„ÙŽÙ€
+يّـ
+فُـ
+قٍ
+ـتٍ
+سّـ
+ÙˆÙŽ
+ـسِـ
+ـتَ
+شِـ
+فَـ
+صُـ
+ـضَّـ
+تَ
+ـقَّـ
+ـطَّـ
+ـفِـ
+سًـ
+فّـ
+وَّ
+كُـ
+ـصَّـ
+عَـ
+لِـ
+ـقِ
+ـقٍ
+ـتّـ
+ـمْـ
+نّـ
+ـقَ
+وٍ
+ـطٍ
+ـةٍ
+هّـ
+هُـ
+ـوٍ
+ـبِـ
+رُ
+حّـ
+تّـ
+وِّ
+زُ
+ـلًـ
+ـفُّـ
+تٍ
+سُـ
+ضٍ
+بِـ
+خَـ
+ىً
+ضّـ
+ـبِّـ
+خّـ
+لًـ
+كَّـ
+ـظًـ
+ظًـ
+ةٍ
+ـغًـ
+ـكِـ
+طُـ
+ـنٍ
+ـقُـ
+ـبُـ
+دَ
+ثًـ
+فِـ
+يٍ
+نْـ
+ضِـ
+جُـ
+هٍ
+ـشِـ
+ـنَّـ
+يًّـ
+فِّـ
+ـفّ
+ـظّـ
+ـسَـ
+ـظِّـ
+ـبَّـ
+رْ
+تَّـ
+بٍ
+ـبَـ
+ـزُّ
+ـدُ
+ـكُـ
+طّـ
+صِـ
+تِـ
+ـغَّـ
+ـعَـ
+ـهِّـ
+ـرُ
+ـثّـ
+سَّـ
+ذً
+ـمَ
+ـلِّـ
+ـزِّ
+يٌّ
+قِّـ
+ـشِّـ
+ـسًـ
+شٍ
+سٍ
+تًـ
+ـلَـ
+ـحُـ
+ـصّ
+ـحِـ
+ـجُـ
+يَّـ
+لَّـ
+Ù‚ÙŽÙ€
+ـبْـ
+اِ
+وُّ
+ـشّـ
+خًـ
+ـسَ
+حُـ
+يْ
+نِـ
+كُّـ
+ـطُّـ
+سْـ
+زِ
+يَّ
+هِـ
+Ù†ÙŽÙ€
+مَّـ
+مٍ
+كِـ
+ـيُّـ
+ـمِـ
+ـدٍّ
+ـحّـ
+ـتَّـ
+رِّ
+ـطّ
+ـرُّ
+عٍ
+زّ
+خَّـ
+قُـ
+ـشَـ
+ـحَـ
+ـجِّـ
+Ù…ÙŽ
+ـيَّ
+ـقّ
+ـغِ
+ـطِ
+ـشُـ
+صّـ
+شّـ
+جِّـ
+جِـ
+وِ
+ـهِ
+ـهِـ
+ــّـ
+ـرٍ
+ـاًّ
+طَّـ
+ثُـ
+تُ
+بَّـ
+Ù‡ÙŽÙ€
+لْـ
+صَـ
+دْ
+يِـ
+كِّـ
+ـعِـ
+ـذَ
+ـةَ
+دَّ
+يِّ
+هًـ
+كْـ
+ـوَ
+ـقَّ
+ـؤّ
+زَ
+حٍ
+يْـ
+ÙƒÙŽÙ€
+فِ
+ـهٍ
+ـنّ
+ـكِ
+ـضَـ
+ـصِـ
+صِّـ
+شِّـ
+رَّ
+يِّـ
+ـاَ
+عُ
+Ø´ÙŽÙ€
+ئًـ
+مٌـ
+لُـ
+ـوِ
+ـقِـ
+ـقَـ
+ـخَـ
+ـةِ
+دِّ
+جْـ
+ةِ
+نْ
+لِّـ
+ـيَـ
+ـنَـ
+ـلٌ
+ـفِ
+ـزَّ
+ـزِ
+ـاِ
+عّـ
+حَّـ
+Ø«ÙŽÙ€
+Ø£ÙŽ
+ـمٍ
+ـكُّـ
+عْـ
+صَّـ
+يٌـ
+مْـ
+مّ
+فُّـ
+ـنْـ
+ـمَّ
+ـكَـ
+ـصِّـ
+ـصَـ
+ـاَّ
+حْـ
+ثّـ
+اُ
+نِ
+ÙƒÙŽ
+ـمِ
+ـلٌّ
+ـلِ
+ـلَ
+ـفَـ
+ـفٍ
+ـظَّـ
+ـزَ
+ـةُ
+ـأُ
+عَّـ
+شَّـ
+ـنِـ
+ـلُ
+ـطِّـ
+ـطَـ
+ـضِّـ
+ـصُـ
+ـسُّـ
+ـحُ
+ـثّ
+ـأَ
+ضَـ
+تْ
+اَ
+مًّـ
+ـيِـ
+ـهُـ
+ـمًّـ
+ـكْـ
+ـعْـ
+ـرِّ
+ـتِـ
+ـتً
+ـاُ
+غَـ
+عِ
+طً
+شًـ
+زٍ
+تِ
+بْـ
+بِ
+لِ
+قْـ
+قٌـ
+فّ
+ـىً
+ـلُّ
+ـلُـ
+ـفُـ
+ــُـ
+ـعَّـ
+ـشَّـ
+ـشًـ
+ـذِ
+ـدٌ
+طِـ
+Ø·ÙŽÙ€
+ضَّـ
+صْـ
+رُّ
+ذُ
+جَّـ
+بِّـ
+ئِـ
+ءُ
+هُّـ
+مِّـ
+مُ
+كِ
+قُ
+فْـ
+ـيٍّ
+ـىَّ
+ـوِّ
+ـكَ
+ـعَ
+ـطَ
+ـسْـ
+ـرٌ
+ـذِّ
+ـدُّ
+ـخَّـ
+ـحْ
+ـجَـ
+ـثَّـ
+ـثُـ
+ـتّ
+ـبِ
+ـاْ
+ـإِ
+عَ
+طِّـ
+صُّـ
+زْ
+خِّـ
+خَ
+ثِـ
+تْـ
+تّ
+بٌـ
+Ø¡ÙŽ
+ءٍ
+وْ
+نُ
+مِ
+كُ
+فْ
+ـوُّ
+ـلٍـ
+ـقٍّ
+ـفِّـ
+ـفًّـ
+ـعُ
+ـعٍ
+ـطْـ
+ـطِـ
+ـطُـ
+ـصٍ
+ـرْ
+ـرٍّ
+ـذُّ
+ـدْ
+ـدِّ
+ـخِـ
+ـجَّـ
+ـثْ
+ـتَّ
+ـةٌ
+سِ
+خْـ
+Ø«ÙŽ
+تُّـ
+تَّ
+إِ
+أّ
+أً
+ءِ
+ءٌ
+يُّـ
+يُّ
+نٌـ
+لْ
+لُ
+Ù„ÙŽ
+قِ
+ـيًّ
+ـيَ
+ـهَّـ
+ـهِّـ
+ـنُّـ
+ـمٍّ
+ـلْـ
+ـلْ
+ـلٍّ
+ـكِّـ
+ـعّ
+ـطَّ
+ـضُـ
+ـضٍ
+ـضٌـ
+ـصْـ
+
+ـصُّـ
+ـصًّـ
+ـسًّـ
+ـدَّ
+ـثِّـ
+ـثِـ
+ـتِّـ
+ـبّ
+ـبَ
+ـأٌ
+غُـ
+ظَـ
+طْـ
+ضْـ
+ضِ
+صّ
+صِ
+شْـ
+سٌـ
+ذْ
+Ø°ÙŽ
+خِ
+خُـ
+خٌـ
+حِّـ
+حٌـ
+بِّ
+بُّ
+بَ
+يٍّ
+ىّ
+نِّـ
+نَّـ
+نٍـ
+نٌ
+مْ
+مٌ
+لُّـ
+قُّـ
+قّ
+فَّـ
+فُ
+فٍـ
+ـيْـ
+ـيَّـ
+ـيً
+ـىّ
+ـوُ
+ـهّ
+ـهَـ
+ـنُ
+ـنَ
+ـمَّـ
+ـلَّ
+ـقٌ
+ـفِّ
+ـفٍّ
+ـفًّ
+ــِّـ
+ــِ
+ــَـ
+ـغِـ
+ـغُـ
+ـغَـ
+ـعٌـ
+ـظّ
+ـظِـ
+ـظَ
+ـطٍّ
+ـطِّـ
+ـطُ
+ـضً
+ـصِ
+ـصَ
+ـصٌ
+ـشّ
+ـسّ
+ـسَّـ
+ـزْ
+ـزُ
+ـرًّ
+ـدًّ
+ـخُـ
+ـخُ
+ـحَّـ
+ـجْـ
+ـثِ
+ـثُ
+ـتْـ
+ـتْ
+ـتِ
+ـبْ
+ـبِّ
+ـبُّـ
+ـبُ
+ـبَّـ
+ـأٰ
+ـأِ
+ـأٍ
+غْـ
+غِّـ
+عْ
+ظِـ
+ضُ
+شّ
+سٍـ
+زِّ
+دُّ
+حْ
+حِ
+جُ
+ثُ
+تٌـ
+تٌ
+ةُ
+Ø©ÙŽ
+ةٌ
+أْ
+أِ
+أٌ
diff --git a/test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/diacritics/language-persian.txt b/test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/diacritics/language-persian.txt
new file mode 100644
index 0000000..00d9840
--- /dev/null
+++ b/test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/diacritics/language-persian.txt
@@ -0,0 +1,48 @@
+ـاً
+اً
+ـهٔ
+Ù‡Ù”
+وِ
+پُـ
+ـلِ
+سِـ
+اِ
+اُ
+ـهُ
+ـرّ
+گِـ
+کِـ
+کُـ
+ژِ
+ـیِ
+ـنِـ
+ـمُ
+ـصّـ
+ـسّـ
+رِ
+دّ
+دِ
+یِ
+هّ
+لِـ
+لِ
+ـیٰ
+ـیّ
+ـیَـ
+ـنِ
+ـمّـ
+ـعّـ
+ـشِ
+ـسِ
+ـزّ
+ـرِ
+ـذّ
+ـخّـ
+ـحِ
+ـثْ
+ـبّـ
+ـبّ
+ـأُ
+تّـ
+تِ
+بُـ
diff --git a/test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/diacritics/language-urdu.txt b/test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/diacritics/language-urdu.txt
new file mode 100644
index 0000000..fddb6e5
--- /dev/null
+++ b/test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/diacritics/language-urdu.txt
@@ -0,0 +1,188 @@
+ـیّـ
+ـمّـ
+ـلّـ
+ـرّ
+ـاً
+ـلِـ
+ـرِ
+بُـ
+ـوّ
+ÙˆÙ”
+اً
+اِ
+ـنّـ
+ثّـ
+ـجّـ
+پُـ
+ـصّـ
+ـہٰـ
+ـعّـ
+ـخّـ
+یَـ
+کُـ
+جّـ
+ـنٰـ
+ـظّـ
+دّ
+ـھّـ
+اُ
+کِـ
+لِـ
+بِـ
+نِـ
+لُـ
+ـلٰـ
+ـدّ
+مّـ
+گُـ
+ـوِ
+ـسّـ
+سُـ
+رِ
+ـھُـ
+مِـ
+يُـ
+ـطّـ
+شِـ
+سَـ
+Ù€Ú¯ÙŽÙ€
+زُ
+ـگُـ
+ئِـ
+قّـ
+قِـ
+ـفّـ
+خّـ
+نّـ
+ـبّـ
+ہِ
+تّـ
+بَـ
+فِـ
+بّـ
+ـیٰ
+ـٹّـ
+ÙˆÙŽ
+چّـ
+پِـ
+لّـ
+دُ
+ـلِ
+ـبٰـ
+ـچّـ
+سِـ
+کّـ
+ٹِـ
+وِ
+ـی٘ـ
+ـۂ
+ـوٰ
+وّ
+Ù€Û’Ù”
+ـکّـ
+نِ
+مُـ
+ـتّـ
+دِ
+یِـ
+ہِـ
+Ú¯ÙŽÙ€
+Ù¾ÙŽÙ€
+ٹّ
+یٔ
+یّـ
+ہُـ
+چُـ
+مِ
+ـوُ
+ـاَ
+اَ
+گِـ
+فِ
+ـےٍ
+Ù€ÚˆÙ‘
+ـؤ
+ـقّـ
+ـجِ
+اٰ
+ـڈِ
+ـپّـ
+ـٹِـ
+ـمِـ
+ـلٔـ
+ـخِ
+رُ
+تِ
+بِ
+Û’Ù”
+Ú©ÙŽÙ€
+ٹُـ
+ـی٘
+Ù€ÚºÙŽ
+ـو٘
+ـنُـ
+ـعّ
+ـشّـ
+ـرُ
+ـحّـ
+ـجِـ
+ـبَـ
+طّـ
+شِ
+شُـ
+رّ
+جِـ
+ئٰـ
+ہٰـ
+ۂ
+ڈِ
+ڈُ
+چِـ
+نِّـ
+نُـ
+Ù†ÙŽÙ€
+مٰـ
+مّ
+Ù…ÙŽÙ€
+لِّـ
+لِ
+فّـ
+ـیّ
+ـیِـ
+ـہ٘ـ
+ـہّ
+ـہِـ
+Ù€ÚºÙ˜
+ـگِـ
+ـکٰـ
+ـکِـ
+ـٹَـ
+ـيّـ
+ـوَ
+ـنِـ
+ـفِـ
+ـصِ
+ـسِـ
+ـزّ
+ـرً
+ـدَ
+ـحِـ
+ـحِ
+ـتّٰـ
+ـتِ
+ـبُـ
+ـأ
+عُـ
+ظِ
+صّـ
+صُـ
+زِ
+رَ
+دِّ
+خُـ
+حِ
+Ø­ÙŽÙ€
+جّ
+جُـ
+جَـ
+تَـ
diff --git a/test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/diacritics/ligature-diacritics.txt b/test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/diacritics/ligature-diacritics.txt
new file mode 100644
index 0000000..80ba2f7
--- /dev/null
+++ b/test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/diacritics/ligature-diacritics.txt
@@ -0,0 +1 @@
+لَا لا لِله للَه لله
diff --git a/test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/ligature-diacritics.txt b/test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/ligature-diacritics.txt
deleted file mode 100644
index 80ba2f7..0000000
--- a/test/shaping/texts/in-tree/shaper-arabic/script-arabic/misc/ligature-diacritics.txt
+++ /dev/null
@@ -1 +0,0 @@
-لَا لا لِله للَه لله
commit ed2f1363a391add41f10cff18792003583a10257
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue May 22 22:12:22 2012 -0400

    Fix substitution glyph class propagation
    
    The old code was doing nothing.
    
    Still got to find an example font+string that makes this matter, but
    need this for fixing synthetic GDEF anyway.

diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh
index 452214a..f6a7575 100644
--- a/src/hb-ot-layout-gsub-table.hh
+++ b/src/hb-ot-layout-gsub-table.hh
@@ -212,9 +212,8 @@ struct Sequence
     TRACE_APPLY ();
     if (unlikely (!substitute.len)) return TRACE_RETURN (false);
 
-    if (c->property & HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE)
-      c->guess_glyph_class (HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH);
-    c->replace_glyphs_be16 (1, substitute.len, (const uint16_t *) substitute.array);
+    unsigned int klass = c->property & HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE ? HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH : 0;
+    c->replace_glyphs_be16 (1, substitute.len, (const uint16_t *) substitute.array, klass);
 
     return TRACE_RETURN (true);
   }
@@ -495,8 +494,7 @@ struct Ligature
       if (likely (c->buffer->info[skippy_iter.idx].codepoint != component[i])) return TRACE_RETURN (false);
     }
 
-    if (first_was_mark && found_non_mark)
-      c->guess_glyph_class (HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE);
+    unsigned int klass = first_was_mark && found_non_mark ? HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE : 0;
 
     /* Allocate new ligature id */
     unsigned int lig_id = allocate_lig_id (c->buffer);
@@ -504,7 +502,7 @@ struct Ligature
 
     if (skippy_iter.idx < c->buffer->idx + count) /* No input glyphs skipped */
     {
-      c->replace_glyphs_be16 (count, 1, (const uint16_t *) &ligGlyph);
+      c->replace_glyphs_be16 (count, 1, (const uint16_t *) &ligGlyph, klass);
     }
     else
     {
diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh
index 919360f..a2e4b2f 100644
--- a/src/hb-ot-layout-gsubgpos-private.hh
+++ b/src/hb-ot-layout-gsubgpos-private.hh
@@ -222,31 +222,20 @@ struct hb_apply_context_t
 
 
 
-  inline void replace_glyph (hb_codepoint_t glyph_index) const
+  inline void replace_glyph (hb_codepoint_t glyph_index,
+			     unsigned int klass = 0) const
   {
-    clear_property ();
+    buffer->cur().props_cache() = klass; /*XXX if has gdef? */
     buffer->replace_glyph (glyph_index);
   }
   inline void replace_glyphs_be16 (unsigned int num_in,
 				   unsigned int num_out,
-				   const uint16_t *glyph_data_be) const
+				   const uint16_t *glyph_data_be,
+				   unsigned int klass = 0) const
   {
-    clear_property ();
+    buffer->cur().props_cache() = klass; /* XXX if has gdef? */
     buffer->replace_glyphs_be16 (num_in, num_out, glyph_data_be);
   }
-
-  inline void guess_glyph_class (unsigned int klass)
-  {
-    /* XXX if ! has gdef */
-    buffer->cur().props_cache() = klass;
-  }
-
-  private:
-  inline void clear_property (void) const
-  {
-    /* XXX if has gdef */
-    buffer->cur().props_cache() = 0;
-  }
 };
 
 



More information about the HarfBuzz mailing list