Glyph insertion is an expensive operation and we like to have it limited
based on buffer's input size which is handled by buffer's max_ops.
clusterfuzz-testcase-minimized-harfbuzz_fuzzer-5754958982021120:
Before the change: 0.67s user 0.00s system 99% cpu 0.674 total
After the change: 0.02s user 0.00s system 98% cpu 0.024 total
Which takes much longer on valgrind and tsan bots.
* [aat] Correct array indexing when looking up actions in KerxSubTableFormat4.
- For action_type 0 and 1, there are 2 values per action record; for action_type 2, there are 4. So we need to account for these factors when indexing into the ankrData array.
Fixes https://github.com/harfbuzz/harfbuzz/issues/2531.
Very low use, only two distinct font files, Apple Chancery.ttf and Hoefler Text.ttc
have it so it really doesn't worth the size addition and so, but one may argue that
whole ligature caret is low use but guess we better to encourage GDEF one anyway.
../test/fuzzing/hb-set-fuzzer.cc: In function ‘int LLVMFuzzerTestOneInput(const uint8_t*, size_t)’:
../test/fuzzing/hb-set-fuzzer.cc:38:82: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
38 | const instructions_t &instructions = reinterpret_cast<const instructions_t &> (data);
|
And it is already disabled at project level so let's disable it here also.
Instead of passing dependencies as required we used one giant shared
dependency list containing all dependencies for every library/executable.
While this kinda works, the specified deps are also used for generating
the pkg-config files and this leads to lots of Requires.private and Libs.private
entries which aren't really needed.
This removes the "deps" array and replaces it with a few smaller ones and
makes sure the public libraries only get passed the dependencies actually
needed.
Fixes#2441
ptem, used for AAT's tracking/`trak` table is equivalent to opsz of variable fonts.
For variable AAT fonts, such as SFNS, ideally variable axis of the hb_font_t
should be set and equivalent to ptem, https://crbug.com/1005969#c37
Searches variation axes of a hb_font_t object for a specific axis first,
if not set, then tries to get default style values from different
tables of the font.
So one can run a category of interested tests like
meson test -Cbuild --suite aots --suite src --print-errorlogs
Intead issuing particular tests which also is possible like
meson test -Cbuild test-shape --print-errorlogs
AAT::Lookup has no other way to detect whether it is returned from
a real and sanitized font data or from a null pool, this checks if
the table has been recognized valid by sanitizer by checking
table's major version which is zero if returned from a null pool and
non-zero if is from a sanitized font data, it is expected the other
calls of the table (unlikely to have more calls however) also do a
similar version check before calling the lookups used on the table.
* [aat] Fix implementation of AAT kerning for Geeza Pro.
Despite what the comment in the code used to say, it appears that Geeza Pro
does rely on accumulating kerning values from successive subtables. With
this change, the results now match Core Text rendering (and avoid the clear
visual breakage reported in #2358).
Testcase: U+0644,U+064E,U+0645,U+064E,U+0651,U+0627
Fixes#2358.
* [aat] Update test expectations, add new testcase.
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
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.
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.
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.