Commit Graph

197 Commits

Author SHA1 Message Date
Ebrahim Byagowi
43016715e1 [subset] minor on _subset 2020-02-05 15:02:20 +03:30
Ebrahim Byagowi
dcb5dfc970 [subset] minor on tables iteration 2020-02-05 15:01:25 +03:30
Ebrahim Byagowi
a8593339e2 [subset] minor on switch statements 2020-02-05 15:00:25 +03:30
Ebrahim Byagowi
b1f63109c6 [subset] Optimize _is_table_present
One call for most of the fonts and no malloc
2020-02-05 00:30:40 +03:30
ckitagawa
0d61926ca7 [subset] Keep head when no glyf table 2020-02-04 23:31:33 +03:30
Ebrahim Byagowi
5b43603385 [subset] Rename _subset2 to _subset 2020-02-04 21:29:24 +03:30
ariza
2792fb8ba1 first rewrite of cff/cff2 _subset with _subset2 2020-02-04 21:20:43 +03:30
ckitagawa
ed857c4680 [subset] Add COLR support 2020-01-28 15:35:53 -05:00
ckitagawa
43b6c865ae [subset] Support sbix subsetting 2020-01-15 13:36:01 -08:00
Ebrahim Byagowi
19d45dcab7 Merge remote-tracking branch 'upstream/master' into var-subset 2019-10-03 13:39:17 +03:30
Ebrahim Byagowi
41d6e95b0d [subset] Use internal API of hb_set_t 2019-09-02 01:58:37 +04:30
Ebrahim Byagowi
8ccf328d54 [subset] Run once for a tag 2019-09-02 01:09:41 +04:30
Ebrahim Byagowi
f441a7c008 Don't allow reference blob be accessed using empty tag in hb_face_reference_table (#1947) 2019-08-31 16:48:09 -05:00
Ebrahim Byagowi
28c8dcb53f
[subset] minor 2019-08-31 12:27:14 +04:30
Ebrahim Byagowi
9ff32b79b3 Merge remote-tracking branch 'upstream/master' into glyf-rebase 2019-08-29 19:53:18 +04:30
Ebrahim Byagowi
875985cd48
[subset] Don't allow malicious fonts to insert unlimited table headers
Fixes https://crbug.com/oss-fuzz/16810
2019-08-29 14:51:22 +04:30
Ebrahim Byagowi
88e9db19d2
[subset] Remove subset table size assertion
As https://github.com/harfbuzz/harfbuzz/pull/1930#issuecomment-525036802
2019-08-27 02:44:26 +04:30
Ebrahim Byagowi
269a120f13
[subset] Raise the bar in new vs old table size
https://crbug.com/oss-fuzz/16740

This is actually an interesting thing that {h,v}mtx allocates as
much as a font pretends to have glyphs but the solution is not
that obvious as regular fonts can have less than actually containing
metrics in their {h,v}mtx. This change raises the bar to consider this
hmtx 4 byte for every glyph case.

Initially we wanted to just find things allocating crazy amount of
memory but having the assert has led to interesting findings also
so let's don't remove the assert and see what we can find elsewhere.
2019-08-25 20:37:00 +04:30
Ebrahim Byagowi
922898c814 [subset] Fail on table grow more than 16x+4096 2019-08-24 16:11:21 +04:30
Ebrahim Byagowi
28aba780c4 [subset] Fix blob leak of _subset2 when returns early
Fixes https://crbug.com/oss-fuzz/16639
2019-08-24 16:11:21 +04:30
Qunxin Liu
37572882e7 [subset] cmap table to use _subset2 and new iterator frameworks 2019-08-05 11:26:34 -07:00
blueshade7
8bf989ea70 update from master 2019-07-08 17:13:29 -07:00
Michiharu Ariza
5763a92749 Merge branch 'master' into var-subset 2019-07-01 15:17:19 -07:00
Qunxin Liu
9bd8d66c2b [subset] VORG table to use _subset2 method and new iterator frameworks 2019-06-24 10:42:59 -07:00
Garret Rieger
f9b1ae7336 [subset] Move OS/2 to subset2. 2019-06-06 12:33:42 -07:00
Qunxin Liu
93d592e0e1 [subset] post table to use _subset2 2019-06-06 10:55:25 -07:00
Qunxin Liu
db938479d7 [subset] maxp table to use _subset2 2019-06-05 14:56:21 -07:00
Michiharu Ariza
4ddab6facc Merge branch 'master' into var-subset 2019-06-05 11:21:27 -07:00
Qunxin Liu
209491fc37 [subset] Hmtx/vmtx tables to use subset2 and new iterator frameworks 2019-06-04 12:08:05 -07:00
rsheeter
96de94768b
Merge pull request #1722 from googlefonts/glyf
[subset] Use iterators in glyf/loca subsetting
2019-05-24 11:22:41 -07:00
Garret Rieger
ff7fc6d488 [subset] Add morx, mort, kern, and kernx to the default layout tables drop list. 2019-05-22 17:36:16 -07:00
Rod Sheeter
d1b12a5465 Merge branch 'master' of https://github.com/harfbuzz/harfbuzz into glyf 2019-05-20 21:29:54 -07:00
Rod Sheeter
82bbec3063 Merge branch 'master' of https://github.com/harfbuzz/harfbuzz into glyf 2019-05-20 21:25:42 -07:00
rsheeter
240bc86e3a [subset] Remove subset-glyf; want everything to point to new iter-based edition. Some of the code will resurface as impl builds out. 2019-05-20 21:25:05 -07:00
rsheeter
02d4d4f3e6 [subset] Starting to sketch glyf as iter 2019-05-20 21:24:59 -07:00
Garret Rieger
0ff3618c2d [subset] Use hb_subset_input_t inside of subset_options_t so that input defaults are shared between the library and cli. 2019-05-20 13:35:46 -07:00
Garret Rieger
3be0ffe45d [subset] Add drop tables to subset input. 2019-05-20 13:35:46 -07:00
Behdad Esfahbod
5ea8ad5c48 [subset] Add HB_NO_SUBSET_CFF
Doesn't fully prune all the relevant code.  To be fixed later.

Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-05-10 23:36:42 -07:00
Behdad Esfahbod
227d85e138 Minor 2019-05-10 23:16:14 -07:00
Garret Rieger
d5decf9bf7 [subset] Move hdmx to subset2. 2019-05-08 15:47:24 -07:00
Behdad Esfahbod
521262b236 [subset] Add TODO 2019-05-07 11:08:08 -07:00
Michiharu Ariza
1223a352b7 Merge branch 'master' into var-subset 2019-04-29 16:43:48 -07:00
Behdad Esfahbod
6977a95fed [subset] Don't crash if subsetting GSUB/GPOS fails
Fixes fuzzer issue.
2019-04-27 10:05:25 -07:00
Behdad Esfahbod
2b051e7aa1 [subset] Check error after calling serializer end 2019-04-27 10:01:11 -07:00
Qunxin Liu
19afd25004 [subset] Update to use _subset2() for name table 2019-04-26 15:24:47 -07:00
Qunxin Liu
408c1daeb4 [subset] subset name table step 1, write out table unmodified, use accelerator to access
string
2019-04-26 15:24:47 -07:00
Michiharu Ariza
6cde814a36 Merge branch 'master' into var-subset 2019-04-16 11:35:07 -07:00
Behdad Esfahbod
19e800c9d8 Ugh. Another try, to unbreak gcc this time!
Jenga.
2019-04-15 12:07:00 -04:00
Behdad Esfahbod
3a88f55c15 Move location of HB_UNUSED to make MSVC happy 2019-04-15 11:59:57 -04:00
Behdad Esfahbod
47e538a35f Add HB_NO_SUBSET_LAYOUT
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-04-12 22:54:15 -04:00