Commit Graph

1702 Commits

Author SHA1 Message Date
Garret Rieger 00d9276343 Add gpos9 expected files to Makefile.am 2021-02-11 13:41:31 -07:00
Garret Rieger 08a4997fde [subset] Add subset support for Extension lookups (GPOS 9, GSUB 7). 2021-02-11 13:41:31 -07:00
Behdad Esfahbod eb069f3948 [tests] Update expected output of recently-merged gpos5
The merged PR was from before landing this:

commit 7a72b20aa2
Author: Garret Rieger <grieger@google.com>
Date:   Thu Sep 24 15:58:48 2020 -0700

    [subset] Subset GDEF during layout subsetting tests.
2021-02-10 19:13:51 -07:00
Behdad Esfahbod c7d232ce4e
Merge pull request #2701 from googlefonts/Mark-To-Ligature_grieger
[subset] GPOS 5 MarkToLigature subsetting support
2021-02-10 18:13:38 -07:00
Khaled Hosny 554aaa0c5d [build] Fix make distcheck
A regression from 7b77ce0507.
It was caught by the CI build in the PR, but apparently we are now used
to CI failures that they are effectively ignored.

Also, yay for multiple build systems.
2021-02-10 23:22:02 +02:00
Behdad Esfahbod 6a3fd94f3b
Merge pull request #2699 from googlefonts/gpos_8
[subset] Add a more complex layout subsetting test case and fix the issues it exposed.
2021-02-09 20:49:04 -05:00
Behdad Esfahbod 33a0f0b686 [test] Remove fuzzed test font that triggers virus alert
Fixes https://github.com/harfbuzz/harfbuzz/issues/2750
2021-02-09 12:55:45 -07:00
Garret Rieger f94bf9f06f [set fuzzer] limit the total number of set members in a fuzzing input.
Currently the fuzzer can create arbitarily long inputs which once big enough will trigger a timeout.
2021-01-26 10:22:07 -08:00
Garret Rieger a4c3732f59 [ENOMEM] fix set clear() causing corruption if the set is in_error(). 2021-01-21 12:12:05 -07:00
David Corbett b2e7bb2a7c Don’t map BCP 47 to coincidentally similar OT tag 2020-11-22 19:35:47 -08:00
David Corbett 17da41bd06 Update language system tag registry to OT 1.8.4 2020-11-18 11:13:35 -08:00
Khaled Hosny c2cdcd4901 [tests] warning: unused variable 'num_glyphs' 2020-10-17 21:57:27 +02:00
David Corbett 0792690b73 [use] Skip WJ and ZWJ when clustering 2020-10-16 22:39:46 -07:00
Khaled Hosny 84dd65a874 [test] Remove timeout from test runners
See https://github.com/harfbuzz/harfbuzz/issues/2707#issuecomment-707744079

This wasn’t inconsistent as well, HB_TEST_SUBSET_FUZZER_TIMEOUT defaulted
to 12 in the test runner, but it was overridden to 50 in meson.build,
and then meson has its own test timeout.
2020-10-15 00:49:02 -07:00
Khaled Hosny fa771a7f85 [tests] Fix memory leak in test
To make valgrind bot happy.
2020-10-11 13:15:39 -07:00
David Corbett 1d53268dfe Fix two-way mapping of "man" and 'MNK ' 2020-10-11 11:38:40 -07:00
Behdad Esfahbod 540d2cdddb [tests/buffer] Revert unintended whitespace changes
From 9e5538d6a3

Tried squashing into, but too much merge conflict.
2020-10-09 22:27:55 -06:00
Behdad Esfahbod 04658ec48f [tests/buffer] Update tests for previous commit 2020-10-09 22:27:55 -06:00
Simon Cozens 7c0bc0bb92 Serialize invalid buffer to !! (text) or [] (json)
There is no generic deserialize - you have to choose glyphs or unicode - so there is no way to deserialize this buffer.
2020-10-09 22:27:55 -06:00
Simon Cozens 150f391438 Prohibit mixed glyphs/unicode buffers in deserialization 2020-10-09 22:27:55 -06:00
Simon Cozens 3d3c87e7e7 Put the flags back in and serialize clusters.
Note that now JSON glyph buffers and Unicode buffers look very similar, except for the g/u property difference.
2020-10-09 22:27:55 -06:00
Simon Cozens 432a05b2af (Simple) tests for Unicode serialization/deserialization 2020-10-09 22:27:55 -06:00
Garret Rieger be33704c00 Add gpos 5 tests to meson build file. 2020-10-09 16:46:46 -07:00
Qunxin Liu 3a0b05faf1 [subset] GPOS 5 MarkToLigature subsetting support 2020-10-01 15:59:16 -07:00
Garret Rieger 010accb3d5 [subset] Add additional test cases for the Amiri tests. 2020-09-28 17:39:09 -07:00
Garret Rieger 3271a7cdaa [subset] Remove redundant langys from Amiri test font.
FontTools removes these when subsetting but harfbuzz does not yet support redundant langsys removal. So this gets the Amiri tests passing for now.
2020-09-28 16:46:15 -07:00
Garret Rieger 9fad540245 [subset] check that sub rules in ContextFormat 1 and 2 intersect the glyphs set before recursing during closure lookups. 2020-09-28 13:24:25 -07:00
Garret Rieger 7b77ce0507 [subset] Add subsetting integration test using Amiri.
Demonstrates a failure in subsetting GPOS 8/GSUB 6.
2020-09-24 16:35:59 -07:00
Garret Rieger 7a72b20aa2 [subset] Subset GDEF during layout subsetting tests. 2020-09-24 15:58:48 -07:00
ebraminio 1f8b1e7f18
[ENOMEM] Return gracefully if stages isn't initialized correctly (#2639)
This happens if calls to 'm.lookups[table_index].push ()' has been
silently failed due to lack of memory.

This change just returns gracefully instead issuing the assert.

Fixes https://crbug.com/oss-fuzz/24494
2020-09-21 11:39:38 +03:30
Garret Rieger bbbcad0dbb Revert "[ENOMEM] don't perform set process operations if the other set is in an error state."
This reverts commit f3929abafe.
2020-09-16 12:23:38 -06:00
Garret Rieger f3929abafe [ENOMEM] don't perform set process operations if the other set is in an error state.
Running a process while the other set is in an error state can potentially corrupt this sets map map (for example by overwritting all of the major values with 0).
2020-09-16 10:36:30 -07:00
Simon Cozens 584d3a43b2
Merge pull request #2681 from khaledhosny/myanmar-liga
[myanmar] Don’t disable liga feature
2020-09-16 15:08:50 +01:00
Khaled Hosny 7d64b09765 [myanmar] Don’t disable liga feature
This seems to have been carried over from the Indic shaper, but
Uniscribe enables it by default.

See https://github.com/harfbuzz/harfbuzz/issues/2213#issuecomment-686062915
2020-09-12 21:45:19 +02:00
Garret Rieger 8c3d4de796 [subset] Fix integer underflow in ContextFormat2. 2020-09-11 15:52:46 -07:00
David Corbett 91fe20f0f5 Disambiguate OT tags when primary tag is not first 2020-09-08 09:20:00 -04:00
David Corbett e3db84a9d0 [use] Test CGJ and ZWNJ 2020-09-02 15:51:15 -07:00
Garret Rieger 9825e3dd2e [ENOMEM] fix access to unitialized memory.
If the serialize() call fails to write the object then we can't safely read varstore_prime fields. Fixes https://oss-fuzz.com/testcase-detail/5137462782066688.
2020-09-02 11:01:07 -07:00
David Corbett 420a74f772 [USE] Fix assertion failure for joining scripts 2020-08-28 14:11:48 -04:00
ebraminio 1e48225ca3
[ENOMEM] Check whether serialize context isn't in error 2020-08-13 23:22:14 +04:30
Ebrahim Byagowi 6e32145dc9 [meson] Make compatbile with 0.47.0 2020-08-13 18:28:42 +04:30
Garret Rieger 9562239f05 [ENOMEM] check for error in lookup visited set. 2020-08-13 01:43:11 +04:30
Garret Rieger 6f754852c1 [ENOMEM] skip asserts in to_bias if serializer is in an error state. 2020-08-12 11:25:30 +04:30
Ebrahim Byagowi 057769b1a3 [fuzzer] minor 2020-08-12 02:40:55 +04:30
Ebrahim Byagowi 0417938011 [fuzzer] Mark alloc_state as unused
It is really unused when failing-alloc isn't on.
2020-08-12 02:40:55 +04:30
Ebrahim Byagowi 5193357832 Revert "Remove autotools build support"
This reverts commit 01ac32aab2.
2020-08-11 23:51:59 +04:30
Ebrahim Byagowi ffe06c8f04 [glyf] Guard all the public APIs against null pool runs
Fixes https://crbug.com/oss-fuzz/24575 and https://crbug.com/oss-fuzz/24737
2020-08-08 13:43:49 +04:30
Ebrahim Byagowi 01ac32aab2 Remove autotools build support 2020-08-07 23:28:12 +04:30
Ebrahim Byagowi 679fac87df Skip hb_shape if buffer object is immutable 2020-08-06 23:47:35 +04:30
Ebrahim Byagowi ec17b62457
[var] Apply variations on empty glyphs
It was ignoring empty glyphs for no good reason, this fixes it.

Fixes #2618
2020-08-06 20:16:11 +04:30