[HarfBuzz] harfbuzz: Branch 'master' - 6 commits
Behdad Esfahbod
behdad at kemper.freedesktop.org
Wed Nov 14 11:59:18 PST 2012
src/hb-buffer-private.hh | 1
src/hb-buffer.cc | 8 +-
src/hb-buffer.h | 27 +++++-----
src/hb-ot-shape-complex-indic.cc | 8 ++
test/api/test-buffer.c | 2
test/shaping/hb_test_tools.py | 2
test/shaping/texts/in-tree/shaper-indic/indic/script-sinhala/misc/misc.txt | 1
7 files changed, 26 insertions(+), 23 deletions(-)
New commits:
commit 6b19fa48621dbf36d471d5005f6ae20df350954f
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Wed Nov 14 11:38:50 2012 -0800
Adjust diff rule for the new hb-shape output format
diff --git a/test/shaping/hb_test_tools.py b/test/shaping/hb_test_tools.py
index 6139ec1..ccb0e1c 100644
--- a/test/shaping/hb_test_tools.py
+++ b/test/shaping/hb_test_tools.py
@@ -295,7 +295,7 @@ class DiffHelpers:
def test_passed (lines):
lines = list (lines)
# XXX This is a hack, but does the job for now.
- if any (l.find("space|space") >= 0 for l in lines if l[0] == '+'): return True
+ if any (l.find("space+0|space+0") >= 0 for l in lines if l[0] == '+'): return True
if any (l.find("uni25CC") >= 0 for l in lines if l[0] == '+'): return True
if any (l.find("dottedcircle") >= 0 for l in lines if l[0] == '+'): return True
if any (l.find("glyph0") >= 0 for l in lines if l[0] == '+'): return True
commit dde5506fd963e3cec27c3389bb1fc092f86d1e06
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Wed Nov 14 11:37:04 2012 -0800
[Indic] Don't move virama with left matra
This is important for the Sinhala U+0DDA split matra since it decomposes
to U+0DD9,U+0DCA where U+0DD9 is a left matra and U+0DCA is the virama.
We don't want to move the virama with the left matra.
TEST: U+0D9A,U+0DDA
Note that we were already doing this in the Uniscribe bug compatibility
mode. We now do it all the time.
diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc
index a948d52..1c7de0d 100644
--- a/src/hb-ot-shape-complex-indic.cc
+++ b/src/hb-ot-shape-complex-indic.cc
@@ -662,13 +662,17 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan,
if ((FLAG (info[i].indic_category()) & (JOINER_FLAGS | FLAG (OT_N) | FLAG (OT_RS) | HALANT_OR_COENG_FLAGS)))
{
info[i].indic_position() = last_pos;
- if (unlikely (indic_options ().uniscribe_bug_compatible &&
- info[i].indic_category() == OT_H &&
+ if (unlikely (info[i].indic_category() == OT_H &&
info[i].indic_position() == POS_PRE_M))
{
/*
* Uniscribe doesn't move the Halant with Left Matra.
* TEST: U+092B,U+093F,U+094DE
+ * We follow. This is important for the Sinhala
+ * U+0DDA split matra since it decomposes to U+0DD9,U+0DCA
+ * where U+0DD9 is a left matra and U+0DCA is the virama.
+ * We don't want to move the virama with the left matra.
+ * TEST: U+0D9A,U+0DDA
*/
for (unsigned int j = i; j > start; j--)
if (info[j - 1].indic_position() != POS_PRE_M) {
commit 82c4d9880a2cd321f6426888511c5f0318f96ad5
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Wed Nov 14 10:56:02 2012 -0800
Add Sinhala test case for split matra U+0DDA
diff --git a/test/shaping/texts/in-tree/shaper-indic/indic/script-sinhala/misc/misc.txt b/test/shaping/texts/in-tree/shaper-indic/indic/script-sinhala/misc/misc.txt
index 8715f72..363fcb6 100644
--- a/test/shaping/texts/in-tree/shaper-indic/indic/script-sinhala/misc/misc.txt
+++ b/test/shaping/texts/in-tree/shaper-indic/indic/script-sinhala/misc/misc.txt
@@ -37,3 +37,4 @@
නâà·à¶à·
රà·â
à¶à·âරà·
+à¶à·
commit d04b12853167d756a8cccaf4154f0fd894bce6de
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Wed Nov 14 10:53:10 2012 -0800
Fix test
diff --git a/test/api/test-buffer.c b/test/api/test-buffer.c
index 51b2277..f826f2e 100644
--- a/test/api/test-buffer.c
+++ b/test/api/test-buffer.c
@@ -71,7 +71,7 @@ fixture_init (fixture_t *fixture, gconstpointer user_data)
case BUFFER_ONE_BY_ONE:
for (i = 1; i < G_N_ELEMENTS (utf32) - 1; i++)
- hb_buffer_add (b, utf32[i], 1, i);
+ hb_buffer_add (b, utf32[i], i);
break;
case BUFFER_UTF32:
commit 92f9bfed42f720c1fd78e795845542661aaf4f8a
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Tue Nov 13 16:50:45 2012 -0800
Minor
diff --git a/src/hb-buffer.h b/src/hb-buffer.h
index 0b16391..8e1690d 100644
--- a/src/hb-buffer.h
+++ b/src/hb-buffer.h
@@ -62,18 +62,6 @@ typedef struct hb_glyph_position_t {
hb_var_int_t var;
} hb_glyph_position_t;
-typedef enum {
- HB_BUFFER_CONTENT_TYPE_INVALID = 0,
- HB_BUFFER_CONTENT_TYPE_UNICODE,
- HB_BUFFER_CONTENT_TYPE_GLYPHS
-} hb_buffer_content_type_t;
-
-typedef enum {
- HB_BUFFER_FLAGS_DEFAULT = 0x00000000,
- HB_BUFFER_FLAG_BOT = 0x00000001, /* Beginning-of-text */
- HB_BUFFER_FLAG_EOT = 0x00000002, /* End-of-text */
- HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES = 0x00000004
-} hb_buffer_flags_t;
hb_buffer_t *
hb_buffer_create (void);
@@ -99,6 +87,12 @@ hb_buffer_get_user_data (hb_buffer_t *buffer,
hb_user_data_key_t *key);
+typedef enum {
+ HB_BUFFER_CONTENT_TYPE_INVALID = 0,
+ HB_BUFFER_CONTENT_TYPE_UNICODE,
+ HB_BUFFER_CONTENT_TYPE_GLYPHS
+} hb_buffer_content_type_t;
+
void
hb_buffer_set_content_type (hb_buffer_t *buffer,
hb_buffer_content_type_t content_type);
@@ -135,6 +129,14 @@ hb_buffer_set_language (hb_buffer_t *buffer,
hb_language_t
hb_buffer_get_language (hb_buffer_t *buffer);
+
+typedef enum {
+ HB_BUFFER_FLAGS_DEFAULT = 0x00000000,
+ HB_BUFFER_FLAG_BOT = 0x00000001, /* Beginning-of-text */
+ HB_BUFFER_FLAG_EOT = 0x00000002, /* End-of-text */
+ HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES = 0x00000004
+} hb_buffer_flags_t;
+
void
hb_buffer_set_flags (hb_buffer_t *buffer,
hb_buffer_flags_t flags);
commit 66ac2ff32e24f0d5658ca172147613081a133847
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Tue Nov 13 16:26:32 2012 -0800
API change: Remove "mask" from hb_buffer_add()
I don't expect anybody using hb_buffer_add(), so this shouldn't break
anyone's code.
diff --git a/src/hb-buffer-private.hh b/src/hb-buffer-private.hh
index 6cfb115..6c1f3a3 100644
--- a/src/hb-buffer-private.hh
+++ b/src/hb-buffer-private.hh
@@ -146,7 +146,6 @@ struct hb_buffer_t {
HB_INTERNAL void deallocate_var_all (void);
HB_INTERNAL void add (hb_codepoint_t codepoint,
- hb_mask_t mask,
unsigned int cluster);
HB_INTERNAL void reverse_range (unsigned int start, unsigned int end);
diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc
index b770144..7a8cb15 100644
--- a/src/hb-buffer.cc
+++ b/src/hb-buffer.cc
@@ -175,7 +175,6 @@ hb_buffer_t::clear (void)
void
hb_buffer_t::add (hb_codepoint_t codepoint,
- hb_mask_t mask,
unsigned int cluster)
{
hb_glyph_info_t *glyph;
@@ -186,7 +185,7 @@ hb_buffer_t::add (hb_codepoint_t codepoint,
memset (glyph, 0, sizeof (*glyph));
glyph->codepoint = codepoint;
- glyph->mask = mask;
+ glyph->mask = 1;
glyph->cluster = cluster;
len++;
@@ -770,10 +769,9 @@ hb_buffer_allocation_successful (hb_buffer_t *buffer)
void
hb_buffer_add (hb_buffer_t *buffer,
hb_codepoint_t codepoint,
- hb_mask_t mask,
unsigned int cluster)
{
- buffer->add (codepoint, mask, cluster);
+ buffer->add (codepoint, cluster);
buffer->clear_context (1);
}
@@ -902,7 +900,7 @@ hb_buffer_add_utf (hb_buffer_t *buffer,
hb_codepoint_t u;
const T *old_next = next;
next = hb_utf_next (next, end, &u);
- buffer->add (u, 1, old_next - (const T *) text);
+ buffer->add (u, old_next - (const T *) text);
}
/* Add post-context */
diff --git a/src/hb-buffer.h b/src/hb-buffer.h
index 533bac8..0b16391 100644
--- a/src/hb-buffer.h
+++ b/src/hb-buffer.h
@@ -177,7 +177,6 @@ hb_buffer_guess_properties (hb_buffer_t *buffer);
void
hb_buffer_add (hb_buffer_t *buffer,
hb_codepoint_t codepoint,
- hb_mask_t mask,
unsigned int cluster);
void
More information about the HarfBuzz
mailing list