NEWS | 29 +++++++++++++++++++++++++ configure.ac | 2 - test/api/test-blob.c | 57 +++++++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 81 insertions(+), 7 deletions(-)
New commits: commit 05686b5f697ed40dd21b330d044c3c286461fb26 Author: Behdad Esfahbod <[email protected]> Date: Mon Feb 25 18:19:20 2013 -0500 0.9.13 diff --git a/NEWS b/NEWS index 7542e8e..7e8d5bd 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,32 @@ +Overview of changes leading to 0.9.13 +Thursday, February 25, 2013 +===================================== + +- Build fixes. +- Ngapi HarfBuzz Hackfest in London (February 2013): + * Fixed all known Indic bugs, + * New Win8-style Myanmar shaper, + * New South-East Asian shaper for Tai Tham, Cham, and New Tai Lue, + * Smartly ignore Default_Ignorable characters (joiners, etc) wheb + matching GSUB/GPOS lookups, + * Fix 'Phags-Pa U+A872 shaping, + * Fix partial disabling of default-on features, + * Allow disabling of TrueType kerning. +- Fix possible crasher with broken fonts with overlapping tables. +- Removed generated files from git again. So, one needs ragel to + bootstrap from the git tree. + +API changes: +- hb_shape() and related APIs now abort if buffer direction is + HB_DIRECTION_INVALID. Previously, hb_shape() was calling + hb_buffer_guess_segment_properties() on the buffer before + shaping. The heuristics in that function are fragile. If the + user really wants the old behvaior, they can call that function + right before calling hb_shape() to get the old behavior. +- hb_blob_create_sub_blob() always creates sub-blob with + HB_MEMORY_MODE_READONLY. See comments for the reason. + + Overview of changes leading to 0.9.12 Thursday, January 18, 2013 ===================================== diff --git a/configure.ac b/configure.ac index 370cba3..b4249cd 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ AC_PREREQ([2.64]) AC_INIT([HarfBuzz], - [0.9.12], + [0.9.13], [http://bugs.freedesktop.org/enter_bug.cgi?product=harfbuzz], [harfbuzz], [http://harfbuzz.org/]) commit 9e5ac7b8c02c86a4f28c79173a5237503eaa7115 Author: Behdad Esfahbod <[email protected]> Date: Mon Feb 25 17:54:10 2013 -0500 Fix blob test to match c3ba49b6fa1865e8318926eaa6c0f2063d1053bb diff --git a/test/api/test-blob.c b/test/api/test-blob.c index 0e65e2f..6759920 100644 --- a/test/api/test-blob.c +++ b/test/api/test-blob.c @@ -262,16 +262,61 @@ static void test_blob_subblob (fixture_t *fixture, gconstpointer user_data) { hb_blob_t *b = fixture->blob; + hb_memory_mode_t mm = GPOINTER_TO_INT (user_data); + unsigned int len; + const char *data; + char *data_writable; + unsigned int i; - fixture->len -= 2; - fixture->data++; - fixture->blob = hb_blob_create_sub_blob (b, 1, fixture->len); + if (mm == HB_MEMORY_MODE_DUPLICATE) { + g_assert_cmpint (fixture->freed, ==, 1); + fixture->data = hb_blob_get_data (b, NULL); + } else { + g_assert_cmpint (fixture->freed, ==, 0); + } + fixture->blob = hb_blob_create_sub_blob (b, 1, fixture->len - 2); hb_blob_destroy (b); + b = fixture->blob; - test_blob (fixture, user_data); + /* A sub-blob is always created READONLY. */ - fixture->data--; - fixture->len += 2; + g_assert (b); + + len = hb_blob_get_length (b); + g_assert_cmpint (len, ==, fixture->len - 2); + + data = hb_blob_get_data (b, &len); + g_assert_cmpint (len, ==, fixture->len - 2); + g_assert (data == fixture->data + 1); + + data_writable = hb_blob_get_data_writable (b, &len); + g_assert_cmpint (len, ==, fixture->len - 2); + g_assert (data_writable); + if (mm == HB_MEMORY_MODE_READONLY) + g_assert (0 == memcmp (data_writable, fixture->data + 1, fixture->len - 2)); + g_assert (data_writable != data); + g_assert_cmpint (fixture->freed, ==, 1); + + data = hb_blob_get_data (b, &len); + g_assert_cmpint (len, ==, fixture->len - 2); + g_assert (data == data_writable); + + memset (data_writable, 0, fixture->len - 2); + + /* Now, make it immutable and watch get_data_writable() fail */ + + g_assert (!hb_blob_is_immutable (b)); + hb_blob_make_immutable (b); + g_assert (hb_blob_is_immutable (b)); + + data_writable = hb_blob_get_data_writable (b, &len); + g_assert (!data_writable); + g_assert_cmpint (len, ==, 0); + + data = hb_blob_get_data (b, &len); + g_assert_cmpint (len, ==, fixture->len - 2); + for (i = 0; i < len; i++) + g_assert ('\0' == data[i]); } _______________________________________________ HarfBuzz mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/harfbuzz
