Commit Graph

1555 Commits

Author SHA1 Message Date
ckitagawa
b22f61d86a Fix bug 2020-04-21 16:51:55 -07:00
Ebrahim Byagowi
750bb73e32 [meson] Add an experimental-api option 2020-04-21 01:26:08 +04:30
Ebrahim Byagowi
0181f03019 [test] Workaround Windows pipe issue by storing ttx in a file 2020-04-20 18:32:35 +04:30
Ebrahim Byagowi
ac26f19c9e Refactor test/api/meson.build and always run test-unicode test 2020-04-19 23:19:18 +04:30
Ebrahim Byagowi
c6b3f73b09 [meson] Make harfbuzz-icu separate module optout-able 2020-04-19 02:06:01 +04:30
Christoph Reiter
8ae06c9489 meson: build a separate library for harfbuzz-icu
This adds a seperate library like with autotools.

This also fixes the ico feature option which was just set to required:false
when disabled instead of really disabling it.
Disabling is still broken with msvc because it then tries to find the library
another way, but that's broken for all other deps as well so I left it as is.

For tests only test-unicode.c is using icu specific functions so split it out
into its own category which depends on harfbuzz-icu.

Fixes #2338
2020-04-18 23:34:31 +04:30
Christoph Reiter
2354a90008 tests: fix subset/run-tests.py under Windows
It assumed that stdout of a subprocess in binary mode was using
utf-8 which isn't the case. Instead open stdout of the subprocess
in text mode and let Python handle the decoding.
2020-04-18 23:34:26 +04:30
ariza
22f7c61acf implement SID to glyph ID mapping with predefined Charset
Also fixes oss-fuzz 21769
2020-04-18 15:42:30 +04:30
Ebrahim Byagowi
fefaa8c835
[test] define G_APPROX_VALUE and EPSILON only when used
resolves -Weverything bot complain
2020-04-17 22:28:09 +04:30
Ebrahim Byagowi
29c903223b Move hb_ot_layout_closure_{features,lookups} behind EXPERIMENTAL flag 2020-04-17 22:25:45 +04:30
Ebrahim Byagowi
9b7fb5c23f Move hb_font_get_var_coords_design behind HB_EXPERIMENTAL_API 2020-04-17 20:29:04 +04:30
Ebrahim Byagowi
a5e5a79004
[tests] Enable the just added macOS test for older version
The test is added in 7035c9cd but the same font is available in older versions of macOS
so let's run it in older versions also.

It doesn't matter much, more for consistency reasons.
2020-04-16 01:38:43 +04:30
Jonathan Kew
7035c9cdfe Add test for #2290.
This tests that we can set two separate Type=Ligature selectors at the same time,
common=off + discretionary=on.
2020-04-16 01:33:01 +04:30
Qunxin Liu
0d5695983e [subset] fixes dangling object_t issue in FeatureVariationRecord
Fixes https://crbug.com/oss-fuzz/21560
revert () does not clean up useless object_t. Adjust the order of
subsetting substitutions and conditions to avoid dangling object_t.
2020-04-06 13:41:33 +04:30
Ebrahim Byagowi
57b7de032f [subset] Fail ClassDefFormat1 serialization if no space available
Fixes https://crbug.com/oss-fuzz/21580
2020-04-05 17:38:04 +04:30
Qunxin Liu
c8cc1e378d fix issues in ClassDefFormat1 serialize:
glyph ids in Iterator may be non-consecutive,
so the number in classValue might be larger than length of the Iterator
2020-04-03 12:31:48 -07:00
Ebrahim Byagowi
4a49b36a9e [tests/macos] Adopt added Apple Chancery tests with older macos versions 2020-04-03 21:32:34 +04:30
Jonathan Kew
548a25259e Add a test for #2307. 2020-04-03 19:57:43 +04:30
Jonathan Kew
120d86fa18 Add tests for #2305. 2020-04-03 19:20:48 +04:30
Ebrahim Byagowi
89fa70f511 [aat] minor over previous feat related changes 2020-04-03 01:08:01 +04:30
Jonathan Kew
58b4d18b53 Add a couple testcases for issue 2285.
A few simple testcases to confirm that setting liga=0 does not break shaping with
the Tibetan AAT font Kokonor, but does still disable common ligatures in Times.
2020-04-02 23:58:32 +04:30
Garret Rieger
014e038b2c [subset] Bail out of context lookup expansion once the lookup limit is encountered. 2020-04-01 11:14:41 +04:30
Garret Rieger
5d345d0cd1 [subset] Limit the number of lookup indices processed subsetting Feature.
> Also, remove two unnessecary full iterations of the lookup index iterator during serialization of the index array. Fixes fuzzer found timeout.
2020-04-01 11:13:05 +04:30
Ebrahim Byagowi
96d792ae80 [avar] Prevent mul overflow
Fixes https://crbug.com/oss-fuzz/21350
2020-03-26 15:01:14 +00:00
Garret Rieger
4ad686b9c0
[subset] fix fuzzer timeout in layout closure
Bail out of chain context lookup expansion once the lookup limit is encountered.
2020-03-26 06:32:28 +00:00
Ebrahim Byagowi
7054b12206 [meson] Mark rest of non-install executables explicitly 2020-03-24 19:06:09 +00:00
Ebrahim Byagowi
68df3f7dac [meson] test/api, separate subset tests 2020-03-24 19:06:09 +00:00
Ebrahim Byagowi
600bf21fbc [meson] Add draw-fuzzer runner 2020-03-24 19:06:09 +00:00
Ebrahim Byagowi
28deb6b718 [meson] test/fuzzing simplify 2020-03-24 19:06:09 +00:00
Ebrahim Byagowi
78622231ac [meson] More comment on tests are causing timeout failure 2020-03-24 19:06:09 +00:00
Ebrahim Byagowi
9bc792f416 [meson] Don't set MALLOC_PERTURB_ as it is already set by meson 2020-03-24 19:06:09 +00:00
Ebrahim Byagowi
e8808c1c20 [meson] Minor, replace tabs with spaces 2020-03-24 19:06:09 +00:00
Ebrahim Byagowi
4dfda9feaa [meson] Update and simplify test/shaping 2020-03-24 19:06:09 +00:00
Ebrahim Byagowi
f22e92bb30 [meson] Update test/api from autotools 2020-03-24 19:06:09 +00:00
Ebrahim Byagowi
e248a4e46c [make] Minor reordering on test/api/Makefile.am 2020-03-24 19:06:09 +00:00
Ebrahim Byagowi
d57fc627e9 [meson] raise timeout value of subset fuzzer 2020-03-24 19:06:09 +00:00
Ebrahim Byagowi
761695264b [tests] Remove py2 workaround for lack of timeout in subprocess 2020-03-19 10:32:46 +00:00
Ebrahim Byagowi
b5526a09ff [tools] Remove in-house 'which' now that we have py3 2020-03-19 10:32:46 +00:00
Ebrahim Byagowi
a0c58be371 [tools] Remove py2 remains 2020-03-18 23:41:20 +03:30
Ebrahim Byagowi
03564fd2cf
[test] fix misspell 2020-03-14 20:09:00 +03:30
Ebrahim Byagowi
1b8a37f75f
[test] minor fix
oops...
2020-03-14 20:06:41 +03:30
Ebrahim Byagowi
0423da3373
[test] minor fix
macos tests are using absolute path which aren't relevant in Windows
2020-03-14 20:05:23 +03:30
Ebrahim Byagowi
74fdd34f4d
[test] make run-tests.py work on Windows 2020-03-14 20:03:14 +03:30
Tim-Philipp Müller
a3892be701 [meson] fix spurious warning when building test/api C sources
Fixes compiler warning

  test-unicode.c:589:1: warning: ‘test_unicode_properties_lenient’ defined but not used

which didn't happen with autotools.

Reason it does with meson is that the setup for C was slightly wrong.
We would only add -DHAVE_CONFIG_H to cpp_args which is only valid when
compiling C++ code, but not plain C code, and many of these tests were
plain C.

Instead pass -DHAVE_CONFIG_H via add_project_arguments() and make sure
to set both c_args and cpp_args when building test executables.

Fixes https://github.com/harfbuzz/harfbuzz/issues/2257
2020-03-14 15:16:00 +03:30
Garret Rieger
430bf69653 Add potentially crashing font as a fuzzer seed. 2020-03-14 00:55:47 +03:30
Chun-wei Fan
da95a8c239 Shaping tests: Skip FreeType tests if support not present
HarfBuzz could have been built without FreeType, so we skip the test
when hb-shape reports that the font function `ft' is unknown
2020-03-13 14:30:17 +03:30
Ebrahim Byagowi
755a77d660 Move outline draw API behind HB_EXPERIMENTAL_API directive 2020-03-13 08:25:53 +03:30
Garret Rieger
834a224a50
[subset] Put a limit on the number of lookup indices that can be visited during closures
Fixes https://crbug.com/oss-fuzz/21025
2020-03-12 13:32:36 +03:30
Ebrahim Byagowi
12df69e59c
Minor, delete not needed cmake testing file 2020-03-11 21:52:43 +03:30
Ebrahim Byagowi
943bfeda53 [meson] Enable more of the subset tests 2020-03-11 21:49:26 +03:30