Commit Graph

594 Commits

Author SHA1 Message Date
Garret Rieger
1b79b8cd2d [subset] update gpos tests to reflect updated behaviour. 2021-03-16 15:23:11 -07:00
Behdad Esfahbod
1c693e8c28 [test] Fix unused-var warning 2021-02-22 17:11:36 -07:00
justvanrossum
1551f3d518 fixing more expected test results 2021-02-19 16:53:21 -07:00
justvanrossum
79e4f436e7 Apply rounding correctly when calculating glyph extents for CFF and CFF2; adjust expected test results 2021-02-19 16:53:21 -07:00
justvanrossum
d01ebeae21 calculate extents based on scaled then rounded values; undo two of the earlier test result adjustments 2021-02-19 16:53:21 -07:00
justvanrossum
1d02e9c63b two more adjusted expected extents results (still not convinced this is the right thing, though) 2021-02-19 16:53:21 -07:00
justvanrossum
cd0babe6a6 adjust expected test result 2021-02-19 16:53:21 -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
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 9e5538d6a3d6f1ffbee7fad3c821621f17d61494

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
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
David Corbett
91fe20f0f5 Disambiguate OT tags when primary tag is not first 2020-09-08 09:20:00 -04:00
Ebrahim Byagowi
5193357832 Revert "Remove autotools build support"
This reverts commit 01ac32aab2.
2020-08-11 23:51:59 +04:30
Ebrahim Byagowi
01ac32aab2 Remove autotools build support 2020-08-07 23:28:12 +04:30
Ebrahim Byagowi
694a0c6bbc [meson] Always add icu deps 2020-07-06 22:19:59 +04:30
Ebrahim Byagowi
aa732e454a
[tests] minor, ligcarets is fetched from gdef not gsub 2020-07-06 00:10:16 +04:30
Ebrahim Byagowi
122a2897e4 [aat] Remove lcar support
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.
2020-07-06 00:05:36 +04:30
Ebrahim Byagowi
a3b9b94b63
[style] Remove fdsc support (#2541)
It isn't exposed yet and low use between Apple fonts,
32 fdsc table vs 767 OS/2 tables, even Apple doesn't
support it anymore per Ned.
2020-07-06 00:05:21 +04:30
Ebrahim Byagowi
831b090001 rebase draw test as recent roundf changes 2020-06-28 14:31:21 +04:30
Ebrahim Byagowi
0881611778 [fuzzer] Make some use for test_font API calls
Making some use for result of some of the test_font calls to make
sure compilers in fuzzers aren't just optimizing the calls.
2020-06-20 22:06:11 +04:30
Ebrahim Byagowi
b4f34539c2 [fuzzer] test more of ot-layout APIs 2020-06-20 22:06:11 +04:30
Ebrahim Byagowi
675854b2ba [test] Add one more test for hb_ot_layout_feature_get_characters 2020-06-19 23:27:39 +04:30
Ebrahim Byagowi
1bac85828c [layout] Rename _get_alternates to _get_glyph_alternates 2020-06-18 22:56:07 +04:30
Ebrahim Byagowi
1348a2c865 [layout] hb_ot_layout_lookup_get_alternates, a new API
An API to retrieve one-to-one alternates from a given GSUB lookup index.
2020-06-18 09:11:07 +04:30
Qunxin Liu
973c47f6c9 [subset] Move 2 experimental public api methods to be private methods in GSUB/GPOS.
2 methods are: hb_ot_layout_closure_lookups and hb_ot_layout_closure_features
2020-06-12 01:20:30 +04:30
Christoph Reiter
03bd6ead44 [meson] Only pass required dependencies to everything
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
2020-06-04 23:28:57 +04:30
Ebrahim Byagowi
759df46575 [style] Hide behind HB_EXPERIMENTAL_API compile flag 2020-06-04 20:33:39 +04:30
Ebrahim Byagowi
d54de56870 [style] Adopt with meson 2020-06-04 20:33:39 +04:30
Ebrahim Byagowi
de0ec5f4fe [style] give ptem value when asked for opsz
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
2020-06-04 20:33:39 +04:30
Ebrahim Byagowi
22037499b4 [style] New experimental API, hb_style_get_value
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.
2020-06-04 20:33:39 +04:30
Ebrahim Byagowi
a9d13463b5 [meson] Categorize tests using suite: [...]
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
2020-05-30 16:58:46 +04:30
Ebrahim Byagowi
b32d169d22 [test] run aat APIs in shape fuzzer 2020-05-23 13:03:06 +04:30
Ebrahim Byagowi
2264a7011f [tests] some more ligature carets tests 2020-05-23 12:15:18 +04:30
Ebrahim Byagowi
759ab4fe56 [meson] Use subdir_done to simplify test/api/meson.build 2020-05-21 08:24:15 +04:30
Ebrahim Byagowi
c68ab4b52b Fix _get_ligature_caret's oob read issue
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.
2020-05-21 06:56:09 +04:30
Ebrahim Byagowi
57886e2162 [test] Enable tests fixed by 461cd5a which was regressed by b986fea 2020-05-21 06:29:56 +04:30
Ebrahim Byagowi
ca2705f1fb [tests] Add more tests for _get_ligature_carets 2020-05-21 00:05:54 +04:30
David Corbett
b207eab842 Round-trip OpenType tags through BCP 47 2020-05-15 15:00:15 -07:00
Behdad Esfahbod
c15146448b
Merge pull request #2264 from harfbuzz/unicode-13
Update to Unicode 13.0.0
2020-05-14 19:12:41 -07:00
Qunxin Liu
b2a965df5e [subset] Add support for "--gids" option
cmap subsetting now retains entries associated with any glyph ids explicitly requested
2020-05-11 15:28:58 -07:00
David Corbett
fd748fac41 Update to Unicode 13.0.0 2020-04-29 17:17:03 -04:00
Qunxin Liu
e53c44e326 [subset] temporarily revert previous cmap commit
Required in https://github.com/harfbuzz/harfbuzz/issues/2356
2020-04-25 12:21:22 +04:30