Commit Graph

1664 Commits

Author SHA1 Message Date
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
Ebrahim Byagowi
0722889a6e
[meson] increase subset tests timeout
https://github.com/harfbuzz/harfbuzz/runs/676665822#step:6:570

fails because meson runs the tests in parallel, correct fix will be making the tests smaller
2020-05-15 10:10:27 +04:30
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
jfkthame
100d40c827
[aat] Fix implementation of AAT kerning for Geeza Pro. (#2388)
* [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.
2020-05-05 17:48:24 -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
Evgeniy Reizner
05be05eb65 [kern] Test format 3. 2020-04-22 09:30:25 -07:00
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
Ebrahim Byagowi
c494d7abcd Remove cmake testing and add meson build bot
CMake tests are broken anyway as py3 changes so let's get rid of them
2020-03-11 20:15:10 +03:30
Ebrahim Byagowi
1c3f80ba13 [meson] Minor updates 2020-03-11 20:15:10 +03:30
Tim-Philipp Müller
f1e5f4a784 meson: tests: shaping: add aots tests 2020-03-11 19:18:57 +03:30
Tim-Philipp Müller
84725fb005 meson: tests: shaping: add missing in-house tests 2020-03-11 19:18:57 +03:30
Tim-Philipp Müller
8fc66dbf9f meson: tests: subset: no need to check for 'which' command any more
Test runner script now handles that.
2020-03-11 19:18:57 +03:30
Khaled Hosny
04438554c8 meson: Update build files after rebase 2020-03-11 19:18:57 +03:30
Tim-Philipp Müller
618584e923 meson: rename incbase to incconfig
Makes it clearer what it's for: config.h. See #4.
2020-03-11 19:18:57 +03:30
Mathieu Duponchelle
d4a7237327 meson: all tests passing on Windows / MSVC 2020-03-11 19:18:57 +03:30
Mathieu Duponchelle
7ee650b173 meson: refactor fuzzing test 2020-03-11 19:18:57 +03:30
Mathieu Duponchelle
920efc0ef7 Add Meson build definitions
Fixes #490

http://mesonbuild.com
2020-03-11 19:18:57 +03:30
Ebrahim Byagowi
78eabf247e [test] Enable OT funcs on tests that are working 2020-03-10 14:07:37 +03:30
Ebrahim Byagowi
0d729b4b72 [avar] Fix out-of-bound read when input is bigger than all the coords
'i' shouldn't become equal to array's length which as the increament
is happened at end of the loop, if the input is bigger than all the
table coords, it will be equal to array's length.

Fixes https://crbug.com/oss-fuzz/21092
2020-03-07 13:20:41 +03:30
Ebrahim Byagowi
6924e29f62 [var] Fix hb_ot_var_get_axis_infos's offset semantic
The API was adding offset to input's infos buffer index also which is
unusual between our APIs and wrong.
2020-03-06 02:01:04 +03:30
ariza
c05458ec7f update cff & cff2 subsetters 2020-03-05 01:22:51 +03:30
Ebrahim Byagowi
446d1e3bbc [fuzz] Add more of fixed cases 2020-03-05 00:49:03 +03:30
Ebrahim Byagowi
99b5b3f1b1 [gvar] Make sure TupleVarHeader has the needed size
Fixes https://crbug.com/oss-fuzz/21026
2020-03-04 12:43:26 +03:30
Ebrahim Byagowi
558f922788 [fuzz] Avoid empty memcpy and ubsan complain by length checking before memcpy 2020-03-03 21:39:22 +03:30
Ebrahim Byagowi
6543d166fd [fuzz] Remove the not yet fixed timeout, going to investigate 2020-03-03 21:39:22 +03:30
Ebrahim Byagowi
2bbf1c8673 [fuzz] Add more of supposed to already be fixed cases from Chromium bug tracker 2020-03-03 21:39:22 +03:30
Ebrahim Byagowi
f253f06cf3 [fuzz] Add another fixed case
https://crbug.com/oss-fuzz/14626

another numerous subtables count which is fixed by d38360397
2020-03-03 19:12:04 +03:30
Ebrahim Byagowi
d383603976
Limit OT::Lookup subtables (#2219)
Fixes https://crbug.com/oss-fuzz/13943
2020-03-02 22:41:08 +03:30
Ebrahim Byagowi
29efd964f2
[fuzz] Add cases that marked as wontfix
Let's see if they were really false alarms, if so, let's just have them.
2020-03-02 14:22:29 +03:30
Ebrahim Byagowi
cb65150fec
[draw] minor 2020-02-29 16:12:54 +03:30
Ebrahim Byagowi
44169f3396
[draw] Fix invalid rendering of some glyph on Estedad-VF
Basically reverts 11f3fca so I can do the same tested and better later

Fixes #2215
2020-02-29 16:04:03 +03:30
Ebrahim Byagowi
86c40b3a1d [fuzz/draw] Call _get_glyph_extents
Other render related APIs also may be added also later such
as ot-color and future rendering things.
2020-02-29 14:53:34 +03:30
Michiharu Ariza
5ab50eebd7
collect_unicodes() with clamp, calling add_range()
Use add_range instead an inner loop, clamp its input number by
number of glyphs a face has.

Even the face cmap12 and 13 have 32-bit hb_codepoint_t, which is here
used to make timeout, face's maxp has 16-bit gid limitation at least for now,
using that makes sure we both fix and the timeout and don't need to change
much things here also in order to support 32-bit gids also someday.

Fixes #2204
2020-02-29 13:02:29 +03:30
Garret Rieger
410b4881d0 [subset] Add fuzzer timeout testcase. 2020-02-28 16:10:14 -08:00
Ebrahim Byagowi
e57ced5fc0
[gvar] Add other possibly fixed fuzzer case
Speculatively should've been fixed by 61208401

https://crbug.com/oss-fuzz/20924 related
2020-02-28 23:29:05 +03:30
Ebrahim Byagowi
758fda728b
[glyf] Don't accept gids higher than maxp's glyphs number
This specially becomes concerning on sub-components where a gvar table
that is sanitized using maxp's glyphs number overflows when a high gid
accepted here goes to it, maybe an additional check can be put there
also, this however feels to be enough.

Fixes https://crbug.com/oss-fuzz/20944
2020-02-28 23:19:06 +03:30
Ebrahim Byagowi
e90213868b Revert "collect_unicodes() to check gid < num_glyphs with cmap 12"
Didn't fix the case actually, making bots to fail.

This reverts commit 15b43a4104.
2020-02-28 21:24:51 +03:30
Ebrahim Byagowi
61208401f4
[gvar] Use hb_bytes_t.check_range instead having in house one
And use TupleVarHeader calculated size for validity check.

Fixes https://crbug.com/oss-fuzz/20919 and possibly other gvar related issues
2020-02-28 21:09:07 +03:30
Michiharu Ariza
15b43a4104
collect_unicodes() to check gid < num_glyphs with cmap 12
fixes #2204
2020-02-28 20:15:39 +03:30
Ebrahim Byagowi
868ecf7b26 [draw] Add fuzzer runner 2020-02-28 19:57:56 +03:30
Ebrahim Byagowi
8eba66c1c6 [gvar] Fix invalid memory access by refactoring GlyphVarData fetch logic
Fixes https://crbug.com/oss-fuzz/20906
2020-02-27 20:26:54 +03:30
Qunxin Liu
5ad761b943 [subset] GDEF MarkGlyphSets subsetting support 2020-02-26 15:15:21 -08:00
Qunxin Liu
fcd7f33bbb [subset] GDEF glyphClassDef subsetting support
glyphClassDef uses the same ClassDef format. However, glyphClassDef table
uses predefined class values so we do not remap class values.
2020-02-26 11:10:31 -08:00
ariza
a99134c5be add oss-fuzz 20886 test file 2020-02-26 09:58:03 -08:00
Ebrahim Byagowi
1b8b863898 minor 2020-02-26 16:36:48 +03:30
Ebrahim Byagowi
132fcfbc47 [fuzz] minor don't abort main.cc when the file was empty or not found 2020-02-26 16:15:17 +03:30
Ebrahim Byagowi
84163c83d3 [draw] Skip commands and paths not contributing anything
They aren't contributing to rendering and making issue for stroking, let's skip them
ourselves as Skia does also https://skia-review.googlesource.com/c/skia/+/268166

They are useful for extracting extents and so which that functionality won't be effected by this change.
2020-02-26 16:09:28 +03:30
Michiharu Ariza
c400cb8863
Re-implement hb_set_t::del_range (#2194)
* optimize hb_set_del_range()

fix issue #2193

* fixed bug & added tests

* coding & comment tweaks
2020-02-25 16:06:03 -08:00
ariza
4081439d2a tweak reflecting review & add test cases 2020-02-25 15:03:12 -08:00
Ebrahim Byagowi
152000d9c7 [fuzz] Practice variations on font object 2020-02-25 21:16:57 +03:30
Ebrahim Byagowi
036d868913 [draw] Add a fuzzer
Specially checks correctness of the API semantics:
* no move happens when a path is already opened with move-to.
* no path will be left open and close-path will happen at the end of opened paths.
* no path opens with a move-to and will be closed with no length.
* paths start and ending points matches.
* no line/quadratic/cubic command will be issued when no path is started.
2020-02-25 19:09:44 +03:30
ariza
173b745da8 fixed bug & added tests 2020-02-24 22:56:57 -08:00
ariza
a5012e97c4 optimize hb_set_del_range()
fix issue #2193
2020-02-24 17:09:48 -08:00
Ebrahim Byagowi
96b71e802f [fuzz] make the custom loader to handle multiple files
Actually this was the way it used to work :)
2020-02-24 23:01:02 +03:30
Ebrahim Byagowi
1f5a54c768 [gvar] fix infinite loop introduced by 11f3fca
The attempt on removing end_points had made the code unreadable
and has intrdouced infinite, fixed by making the code clear what
it tries to achieve.
2020-02-24 14:30:07 +03:30
Ebrahim Byagowi
e17fd0d91c [tools] More on py3 compatibility 2020-02-24 00:10:11 +03:30
Ebrahim Byagowi
0cf050a7b1 [draw] Merge consequent move-to commands of CFF/CFF2 2020-02-23 23:23:50 +03:30
Ebrahim Byagowi
86bd5a0ba1 [draw] End CFF paths with a line-to
Issue a line-to command when start and end point of a path isn't same, matches freetype also.
2020-02-23 23:23:50 +03:30
Garret Rieger
411225426f Fix glyph closure for alternate substitution.
It was not filtering on the glyphs to be retained.
2020-02-21 13:01:23 +03:30
Ebrahim Byagowi
8c652f72fc Minor, switch to https links where possible 2020-02-19 16:32:44 +03:30
Ebrahim Byagowi
8d19907704 Remove python2 support from tests/utils scripts 2020-02-19 16:17:45 +03:30
Qunxin Liu
493e40ff78 [subset] add one empty byte to glyf table
if it's going to end up empty after subsetting
This will make OTS happy and match what fontTools is doing now.
2020-02-19 12:24:38 +03:30
Ebrahim Byagowi
60f8f384f9 [glyf] Switch to ttf-parser's glyf to path algorithm
It consumes each point at a time and doesn't need to know contour size before hand
2020-02-18 00:49:09 +03:30
Ebrahim Byagowi
a94d1af193 [fuzz] minor style fixes 2020-02-12 19:30:31 +03:30
Ebrahim Byagowi
1c015d3e9f [fuzz] minor fuzzer case move, oops 2020-02-12 19:19:37 +03:30
Ebrahim Byagowi
49341faee2 [fuzz] minor, move two fuzzer cases to their correct place 2020-02-12 19:17:18 +03:30
Ebrahim Byagowi
97229244eb [fuzzer] Fix hb-set-fuzzer minor overflow issue
Size shouldn't be smaller than the struct not its pointer size.

Fixes https://crbug.com/oss-fuzz/20655
2020-02-12 15:41:51 +03:30
Garret Rieger
7b42403c1c Add explicit values to the set fuzzer enums. 2020-02-11 13:25:44 -08:00
Garret Rieger
e805923310 Add a few basic seeds for the set fuzzer. 2020-02-11 13:25:44 -08:00
Ebrahim Byagowi
ff984ed3cd Use multiplication to avoid undefined behaviour per clang
Newer versions of MSVC with /we4146 don't like putting negative sign behind a
unsigned number as https://github.com/harfbuzz/harfbuzz/pull/2069
That however have made https://crbug.com/1050424 this complain:
  src/hb-ot-color-sbix-table.hh:304:28: runtime error: negation of -2147483648 cannot be represented in type 'int';
                                        cast to an unsigned type to negate this value to itself
which apparently can be fixed using this change.

Let's see if this won't make another ubsan complain!
2020-02-11 19:51:52 +03:30
Garret Rieger
bca9bc6b92 Add hb-set-fuzzer.
It fuzzes all of the hb_set process methods (intersection, subtraction, union, and symmetric difference).
2020-02-11 03:08:39 +03:30
Ebrahim Byagowi
ab2d3ec542 [var] Implement hb_font_get_var_coords_design
Hold design coords and simulate when normalized coords are set directly.
2020-02-08 11:04:34 +03:30
Garret Rieger
2742c81624 Fix page_map corruption in hb_set_t during process().
If a process operation results in less pages then the current set has, it will likely corrupt the page_map since it overwrites page_map entries ahead of where it's processing. This fixes that problem by removing page_map entries that will be dropped. Then dropping orphaned pages and re-indexing retained pages.
2020-02-08 10:27:44 +03:30
Qunxin Liu
eb7849a806 [subset] GPOS6 MarkToMark subsetting support 2020-02-06 10:46:05 -08:00
Qunxin Liu
82afc75835 [subset] GPOS4 MarkBase subsetting support 2020-02-06 10:46:05 -08:00
Ebrahim Byagowi
b4d3bf1d8a [draw] Add hb_draw_funcs_is_immutable and hb_draw_funcs_make_immutable 2020-02-06 11:52:32 +03:30
Ebrahim Byagowi
63b8190db8 [test] minor
Remained from previous naming.
2020-02-06 11:38:35 +03:30
Ebrahim Byagowi
3a98c7fae1 [glyf] Skip empty contours
As https://savannah.nongnu.org/bugs/index.php?57701
2020-02-06 11:35:48 +03:30
Ebrahim Byagowi
c31762e9e8
[test] minor
don't test first ten glyph, just testing cp just like other API calls is enough
2020-02-05 23:12:37 +03:30
Ebrahim Byagowi
43253e404d Merge remote-tracking branch 'upstream/master' 2020-02-05 17:45:19 +03:30
Ebrahim Byagowi
a7f694d4b0 Merge branch 'subset_cblc' into master 2020-02-05 16:31:21 +03:30
ckitagawa-work
774725b43a
[subset] Avoid incorrectly dropping cmap for NotoColorEmoji.ttf
NotoColorEmoji.ttf uses two cmap subtables

 Format 14 | Platform ID 0 | Platform Encoding ID  5
 Format 12 | Platform ID 3 | Platform Encoding ID 10

This combination results in the cmap table being dropped during subsetting despite being valid/required.
2020-02-05 16:13:10 +03:30
Qunxin Liu
490ef1cc23 [subset] Fix namerecord ordering
This will fix inconsistency with fontTools.
Also according to the spec, namerecords must be sorted
first by platform ID, then by platform-specific ID,
then by language ID, and then by name ID.
2020-02-01 23:07:47 +03:30
ckitagawa
e128f80278 parent 777ba47b50
author ckitagawa <ckitagawa@chromium.org> 1579631743 -0500
committer ckitagawa <ckitagawa@chromium.org> 1580506176 -0500

[subset] Add CBLC support
2020-01-31 16:37:30 -05:00
Qunxin Liu
b6a8f5e63c [subset] CMAP table subsetting fix
Not all codepoints smaller than 0xFFFF go to cmap4 table.
Only subset codepoints existing in each table.
This will also make harfbuzz consistent with fontTools' behavior
2020-01-31 10:49:44 -08:00
ckitagawa
7d542a5274 Refactor to two iterators 2020-01-29 10:21:00 -05:00
ckitagawa
49b98e8650 Fix nullptr de-reference failure if both blobs in a subset test are 0 in size 2020-01-28 15:35:53 -05:00
ckitagawa
ed857c4680 [subset] Add COLR support 2020-01-28 15:35:53 -05:00
Ebrahim Byagowi
d106900bfd [draw][glyf] Implement quadratic to cubic call translation 2020-01-28 15:27:27 +03:30
Ebrahim Byagowi
74fdcdcac8 [draw] Rename conic_to to quadratic_to 2020-01-28 13:45:22 +03:30
Ebrahim Byagowi
ac81e94016 Rename hb_outline_decompose to hb_font_draw_glyph and hb_outline_decompose_funcs_t to hb_draw_funcs_t 2020-01-28 13:24:49 +03:30
Ebrahim Byagowi
981125aa2a Rename hb_ot_glyph_* to hb_outline_* 2020-01-27 23:43:54 +03:30
Ebrahim Byagowi
30857089a5 [test][glyph] add subcomponent scale test 2020-01-27 21:16:57 +03:30
Ebrahim Byagowi
d809aca8d0
[test] test for not applying morx on horizontal runs if gsub exists
https://github.com/harfbuzz/harfbuzz/pull/2130
2020-01-27 20:52:56 +03:30
Ebrahim Byagowi
1438bae7a5 [ot-glyph] Add fontkit non variables fonts tests 2020-01-26 23:58:34 +03:30
Ebrahim Byagowi
9bb1c79a2c [ot-glyph][test] Avoid sprintf use 2020-01-26 23:58:34 +03:30
Ebrahim Byagowi
99f8e52d5e [ot-glyph] Add fontkits's variations toSVG tests 2020-01-26 23:58:34 +03:30
Ebrahim Byagowi
e44982f548 [ot-glyph] Add ttf-parser's outline_glyph tests 2020-01-26 23:58:34 +03:30