[HarfBuzz] harfbuzz: Branch 'master' - 3 commits
Behdad Esfahbod
behdad at kemper.freedesktop.org
Thu Feb 8 22:28:17 UTC 2018
src/hb-aat-layout-common-private.hh | 10 +++++-----
src/hb-aat-layout-morx-table.hh | 7 +++----
test/shaping/data/text-rendering-tests/DISABLED | 2 ++
test/shaping/data/text-rendering-tests/Makefile.sources | 2 ++
test/shaping/data/text-rendering-tests/fonts/TestMORXTwentyfive.ttf |binary
test/shaping/data/text-rendering-tests/fonts/TestMORXTwentysix.ttf |binary
test/shaping/data/text-rendering-tests/tests/MORX-25.tests | 9 +++++++++
test/shaping/data/text-rendering-tests/tests/MORX-26.tests | 2 ++
util/hb-subset.cc | 2 +-
util/options.hh | 10 ++++++++--
10 files changed, 32 insertions(+), 12 deletions(-)
New commits:
commit 194140d3f352b53b95757cccb7fff50425747cd6
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu Feb 8 16:27:57 2018 -0600
[util] Minor
diff --git a/util/hb-subset.cc b/util/hb-subset.cc
index fb6d3635..37ec7b51 100644
--- a/util/hb-subset.cc
+++ b/util/hb-subset.cc
@@ -73,7 +73,7 @@ struct subset_consumer_t
fprintf(stderr, "Unable to open output file\n");
return false;
}
- size_t bytes_written = fwrite(data, 1, data_length, fp_out);
+ ssize_t bytes_written = fwrite(data, 1, data_length, fp_out);
if (bytes_written == -1) {
fprintf(stderr, "Unable to write output file\n");
diff --git a/util/options.hh b/util/options.hh
index 155f7079..411165bf 100644
--- a/util/options.hh
+++ b/util/options.hh
@@ -240,19 +240,25 @@ struct shape_options_t : option_group_t
{
if (error)
*error = "all shapers failed.";
- return false;
+ goto fail;
}
if (normalize_glyphs)
hb_buffer_normalize_glyphs (buffer);
if (verify && !verify_buffer (buffer, text_buffer, font, error))
- return false;
+ goto fail;
if (text_buffer)
hb_buffer_destroy (text_buffer);
return true;
+
+ fail:
+ if (text_buffer)
+ hb_buffer_destroy (text_buffer);
+
+ return false;
}
bool verify_buffer (hb_buffer_t *buffer,
commit 5021ba2a2186a77d7d70be5602b960d14634d8b2
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu Feb 8 15:11:28 2018 -0600
[aat] Minor
diff --git a/src/hb-aat-layout-common-private.hh b/src/hb-aat-layout-common-private.hh
index e0f59a4a..fea3b094 100644
--- a/src/hb-aat-layout-common-private.hh
+++ b/src/hb-aat-layout-common-private.hh
@@ -563,9 +563,9 @@ struct StateTable
unsigned int entry = 0;
while (state < num_states)
{
- if (unlikely (!c->check_array (states + state * nClasses,
- states[0].static_size,
- nClasses * (num_states - state))))
+ if (unlikely (!c->check_array (states,
+ states[0].static_size * nClasses,
+ num_states)))
return_trace (false);
{ /* Sweep new states. */
const HBUINT16 *stop = &states[num_states * nClasses];
@@ -574,9 +574,9 @@ struct StateTable
state = num_states;
}
- if (unlikely (!c->check_array (entries + entry,
+ if (unlikely (!c->check_array (entries,
entries[0].static_size,
- num_entries - entry)))
+ num_entries)))
return_trace (false);
{ /* Sweep new entries. */
const Entry<Extra> *stop = &entries[num_entries];
diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh
index f8209a60..fc834ebf 100644
--- a/src/hb-aat-layout-morx-table.hh
+++ b/src/hb-aat-layout-morx-table.hh
@@ -281,7 +281,7 @@ struct ContextualSubtable
TRACE_SANITIZE (this);
unsigned int num_entries = 0;
- if (unlikely (!machine.sanitize (c, &num_entries))) return false;
+ if (unlikely (!machine.sanitize (c, &num_entries))) return_trace (false);
unsigned int num_lookups = 0;
@@ -454,9 +454,8 @@ struct LigatureSubtable
{
TRACE_SANITIZE (this);
/* The rest of array sanitizations are done at run-time. */
- return c->check_struct (this) && machine.sanitize (c) &&
- ligAction && component && ligature;
- return_trace (true);
+ return_trace (c->check_struct (this) && machine.sanitize (c) &&
+ ligAction && component && ligature);
}
protected:
commit 1242ad8424f5e8357fe6fd2143430aa8cfaf0954
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu Feb 8 14:10:01 2018 -0600
[test/text-rendering-tests] Update from upstream
diff --git a/test/shaping/data/text-rendering-tests/DISABLED b/test/shaping/data/text-rendering-tests/DISABLED
index 51174553..dbe870f1 100644
--- a/test/shaping/data/text-rendering-tests/DISABLED
+++ b/test/shaping/data/text-rendering-tests/DISABLED
@@ -24,6 +24,8 @@ tests/MORX-20.tests
tests/MORX-21.tests
tests/MORX-22.tests
tests/MORX-23.tests
+tests/MORX-25.tests
+tests/MORX-26.tests
# Rounding differences
tests/SHARAN-1.tests
diff --git a/test/shaping/data/text-rendering-tests/Makefile.sources b/test/shaping/data/text-rendering-tests/Makefile.sources
index b12f1733..f77c1bce 100644
--- a/test/shaping/data/text-rendering-tests/Makefile.sources
+++ b/test/shaping/data/text-rendering-tests/Makefile.sources
@@ -48,6 +48,8 @@ DISBALED_TESTS = \
tests/MORX-21.tests \
tests/MORX-22.tests \
tests/MORX-23.tests \
+ tests/MORX-25.tests \
+ tests/MORX-26.tests \
tests/MORX-2.tests \
tests/MORX-3.tests \
tests/MORX-4.tests \
diff --git a/test/shaping/data/text-rendering-tests/fonts/TestMORXTwentyfive.ttf b/test/shaping/data/text-rendering-tests/fonts/TestMORXTwentyfive.ttf
new file mode 100644
index 00000000..e3fadf51
Binary files /dev/null and b/test/shaping/data/text-rendering-tests/fonts/TestMORXTwentyfive.ttf differ
diff --git a/test/shaping/data/text-rendering-tests/fonts/TestMORXTwentysix.ttf b/test/shaping/data/text-rendering-tests/fonts/TestMORXTwentysix.ttf
new file mode 100644
index 00000000..828f6441
Binary files /dev/null and b/test/shaping/data/text-rendering-tests/fonts/TestMORXTwentysix.ttf differ
diff --git a/test/shaping/data/text-rendering-tests/tests/MORX-25.tests b/test/shaping/data/text-rendering-tests/tests/MORX-25.tests
new file mode 100644
index 00000000..ccd0563d
--- /dev/null
+++ b/test/shaping/data/text-rendering-tests/tests/MORX-25.tests
@@ -0,0 +1,9 @@
+../fonts/TestMORXTwentyfive.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0041,U+0042,U+0043,U+0044,U+0045:[A.alt|B.alt at 1000,0|C.alt at 2000,0|D.alt at 3000,0|E.alt at 4000,0]
+../fonts/TestMORXTwentyfive.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0045,U+0042,U+0043,U+0044,U+0041:[E|B at 556,0|C at 1182,0|D at 1778,0|A at 2452,0]
+../fonts/TestMORXTwentyfive.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0043,U+0042,U+0041,U+0042,U+0043:[C|B at 596,0|A.alt at 1222,0|B.alt at 2222,0|C.alt at 3222,0]
+../fonts/TestMORXTwentyfive.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0041,U+0042,U+0043:[A.alt|B.alt at 1000,0|C.alt at 2000,0]
+../fonts/TestMORXTwentyfive.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0043,U+0042,U+0041:[C|B at 596,0|A at 1222,0]
+../fonts/TestMORXTwentyfive.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0041,U+0042:[A.alt|B.alt at 1000,0]
+../fonts/TestMORXTwentyfive.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0042,U+0041:[B|A at 626,0]
+../fonts/TestMORXTwentyfive.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0041:[A]
+../fonts/TestMORXTwentyfive.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0042:[B]
diff --git a/test/shaping/data/text-rendering-tests/tests/MORX-26.tests b/test/shaping/data/text-rendering-tests/tests/MORX-26.tests
new file mode 100644
index 00000000..bebae606
--- /dev/null
+++ b/test/shaping/data/text-rendering-tests/tests/MORX-26.tests
@@ -0,0 +1,2 @@
+../fonts/TestMORXTwentysix.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0041,U+0042:[A|B at 639,0]
+../fonts/TestMORXTwentysix.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0042:[B.alt]
More information about the HarfBuzz
mailing list