Ben Wagner
a78eb43c79
Construct user_data in hb_object
...
hb_object's user_data is created lazily. The previous implementation of
hb_object_set_user_data created space for the user_data but did not
actually construct it. This means that hb_user_data_array_t's lock was
not constructed. If hb_mutex_t is backed by an implementation which
requires that it be constructed (not just zero initialized) then errors
will occur when taking the lock when setting the user data.
Change hb_object_set_user_data to construct the user_data in the created
space and hb_object_fini to call the destructor.
3 years ago
Behdad Esfahbod
30579f5a37
[set] Document & use open-ended del_range()
3 years ago
Khaled Hosny
72489f3e0e
[test] Free memory in hb-aots-tester
3 years ago
Khaled Hosny
895162d6f3
[test] Account for mark zeroing in AOTS tests
...
The AOTS are not written with the face that mark glyphs gets their
advances zeroed. Taking this into account makes 16 more tests to pass.
3 years ago
Khaled Hosny
e65bf60500
[test] make this test runner less verbose
...
Print the command being called once and in a way the can be manually
run.
3 years ago
Behdad Esfahbod
2d54c34680
[subset/VarStore] Fix OOM in fuzzer test
...
The test in question is the one added in c68a00b92e
.
Culprit is that it's allocating lots of memory because of region_indices that
are out-of-range anyway. So, try to filter those out first.
3 years ago
Behdad Esfahbod
ff1fe25a5d
[VarStore] Rename internal get_scalars() to get_region_scalars()
3 years ago
Behdad Esfahbod
d7541f7b55
[util/hb-shape] Free cached resources on termination
3 years ago
Behdad Esfahbod
ad03f34df7
[util/hb-shape] Cache blob/face in batch mode
3 years ago
Khaled Hosny
9a7ff54bb7
[test] Write one sequence per-line
...
https://github.com/harfbuzz/harfbuzz/pull/3087#issuecomment-888691436
3 years ago
Khaled Hosny
ddf87ffb22
[test] Add generated tests for emoji clusters
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3017
Uses AdobeBlank2.ttf from:
https://github.com/adobe-fonts/adobe-blank-2
instead of a dummy empty font so that everything maps to GID 1 and
control code points are kept instead of being dropped because there is
not space glyph (otherwise we’d need to identify control code points
somehow when generating the expectations).
3 years ago
Behdad Esfahbod
f0a1892ff9
[serialize] Remove unnecessary pointer indirection
3 years ago
Behdad Esfahbod
1c511ed6f6
[subset] Simplify VarStore serialization
3 years ago
Behdad Esfahbod
ad4c692492
[subset] Simplify VarStore serialize
3 years ago
Behdad Esfahbod
25dee60977
[sanitize] Revert some from c68a00b92e
...
That overflow check was already happening in arrayZ.sanitize().
3 years ago
Behdad Esfahbod
6fe0d7d6e8
[GSUB] If MultipleSubst is applied to a ligature-component, preserve lig-id
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3069
3 years ago
Behdad Esfahbod
b926fb9bb0
Whitespace
3 years ago
Behdad Esfahbod
cc3a7ceea3
Fix macro-in-macro invocation
...
../src/hb-ot-color-colr-table.hh:980:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive]
\#if COLRV1_ENABLE_SUBSETTING == 1
3 years ago
Behdad Esfahbod
087e2705de
Fix signed-ness error in 0ded6a70c8
3 years ago
Garret Rieger
f3e031539f
Revert "[ci] Bin FontTools version due to recent COLRv1 changes"
...
This reverts commit 163748b505
.
3 years ago
Garret Rieger
acbd8b27dc
[subset] temporarily disable COLRv1 subsetting.
...
Currently COLRv1 spec is being changed so the subsetting implementation is out of sync. Disable subsetting by failing sanitization for COLRv1 tables and disable all colrv1 tests.
3 years ago
Behdad Esfahbod
5dae8297bb
[util] Minor followup to https://github.com/harfbuzz/harfbuzz/pull/3083
3 years ago
Behdad Esfahbod
0ded6a70c8
[subset] Fix another fuzzer issue
...
Addition could overflow on 32bit arch.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36636
Fixes https://oss-fuzz.com/testcase-detail/5072358514753536
3 years ago
Khaled Hosny
c65e1e0842
[test] Run AOTS cmap tests with ot font functions only
...
We are not interested in testing FreeType cmap support.
Fixes most format 4 tests. The remaining test seems to be peculiar, and
I can’t find any cmap implementation that produces the expected output.
3 years ago
Khaled Hosny
8396c523b6
[test] Add AOTS cmap tests
...
Uses https://github.com/adobe-type-tools/aots/pull/3
Related to https://github.com/unicode-org/text-rendering-tests/issues/70
We don’t support format 4 or 8, so these tests are disabled. We support
format 4 but most of the tests are failing, investigating.
3 years ago
Khaled Hosny
50379fbb15
[util] Don’t split text at new lines in batch mode
...
In batch mode (which is used for testing) we are probably not interested
in splitting text into lines as we could have split the string into
different tests. This fixes a bunch of AOTS tests that use newlines as
input.
3 years ago
Khaled Hosny
92b85749f2
[util] Strip quotes when parsing features
...
When running in batch mode, the quotes are not stripped by the shell and
end up in the feature string. This breaks one of the AOTS tests.
Alternatively, we can remove the quotes from the test files, not sure
which is less hacky, though!
3 years ago
Khaled Hosny
ad9559e3e2
[tests] Make AOTS update.py work on macOS
...
Use C++ compiler and make sure C++11 is used.
3 years ago
Khaled Hosny
d84efca312
[tests] Add missed test file to Makefile/meson
...
It was introduced in 205737acdc
but was
not actually used.
See https://github.com/harfbuzz/harfbuzz/issues/2098
3 years ago
Garret Rieger
09474d8d7b
[subset] Fix fuzzer timeout in add_gid_and_children.
...
The composite glyph graph isn't check for max operations by sanitize so track an operations count during the graph traversal.
3 years ago
Behdad Esfahbod
c68a00b92e
[subset] Fix possible overflows in VarRegionList serialize
...
Fixes https://oss-fuzz.com/testcase-detail/5362189182566400
3 years ago
Behdad Esfahbod
7b8464b655
[serialize] Check for overflow in allocate_size()
...
If size was > INT_MAX, then the out-of-room check was failing to perform
as intended.
Part of fixing https://oss-fuzz.com/testcase-detail/5362189182566400
3 years ago
Behdad Esfahbod
bf2c87bfe6
Add hb_memcpy() that does len=0 check
3 years ago
Khaled Hosny
5f801da945
[hb-ms-features] Move code out of header file
3 years ago
Khaled Hosny
990c15dbe5
[hb-ms-features] Rename types to be less general
3 years ago
Khaled Hosny
69199211b7
[uniscribe/directwrite] Move feature setup to shared file
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3070
3 years ago
Garret Rieger
fc7f778120
[subset] add a note to hb-subset on what is and isn't supported ( #3076 )
3 years ago
Behdad Esfahbod
3e4f006fe2
Merge pull request #3079 from harfbuzz/windows-getenv
...
Don’t disable getenv on Windows
3 years ago
Khaled Hosny
791a1bf3a4
Don’t disable getenv on Windows
...
The condition is inverted, regression from
40ec187dec
.
3 years ago
Khaled Hosny
163748b505
[ci] Bin FontTools version due to recent COLRv1 changes
...
Should be reverted once HarfBuzz updated to match FontTools.
3 years ago
Behdad Esfahbod
4762fcb415
Merge pull request #3067 from googlefonts/glyph_names
...
[subset] support option --glyph-names
3 years ago
Behdad Esfahbod
aeec278453
Merge pull request #3068 from harfbuzz/hoi
...
[variations] Support multiple axes with same tag, aka HOI
3 years ago
Behdad Esfahbod
404b91b93d
Merge pull request #3071 from harfbuzz/subset-flags
...
[sebset] Use [s|g]et_flag for retain_all_layout_features
3 years ago
Khaled Hosny
ec99fdb7e8
[sebset] Use [s|g]et_flag for retain_all_layout_features
...
Looks like this was missed when adding hb_subset_input_[s|g]et_flag()
3 years ago
Behdad Esfahbod
c2d58c9747
Merge pull request #3072 from harfbuzz/subset-docs
...
[docs] Improve subset documentation
3 years ago
Khaled Hosny
acc7100a3f
[docs] Improve subset documentation
3 years ago
Khaled Hosny
3e2734cf91
[docs] Don’t use GTK-Doc syntax for internal functions
...
We don’t generate docs for them, reduces the number of warnings.
3 years ago
Qunxin Liu
71b5509c19
[subset] support option --glyph-names
3 years ago
Behdad Esfahbod
b235511ed8
Merge pull request #3021 from googlefonts/stable_api
...
[subset] update hb_subset api with final changes before going stable.
3 years ago
Behdad Esfahbod
a9a607d360
[variations] Support multiple axes with same tag, aka HOI
...
The axes in fvar are in arbitrary order, NOT sorted. Hence have to
lsearch all entries.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1673
Fixes https://github.com/harfbuzz/harfbuzz/issues/2743
Test from https://github.com/ctrlcctrlv/FontForge-Higher-Order-Interpolation
3 years ago