Commit Graph

1312 Commits

Author SHA1 Message Date
Ebrahim Byagowi e766783152 [fuzz] Add https://crbug.com/oss-fuzz/17898 testcase 2019-10-21 22:17:06 +03:30
Qunxin Liu b66094ada0 [subset] GSUB Lookup Type 6: ChainContextSubst 2019-10-18 16:52:55 -07:00
Garret Rieger 831daf4c76 Enforce HB_MAX_LANGSYS limit during layout subsetting. 2019-10-18 15:10:30 -07:00
Ebrahim Byagowi dc45f22521 [ot-metrics] Don't use mixed scaled and not scaled for generating extents 2019-10-08 23:27:39 +03:30
Ebrahim Byagowi d73cdcf361 [ot-font] Apply font scaling before turning to int 2019-10-08 11:11:18 +03:30
Michiharu Ariza b9ff43c162 Implement gvar table and variable glyf
Split from Ariza's "[subset] TrueType/CFF2 variable font" work on #1594
2019-10-06 08:58:40 +03:30
Qunxin Liu b0c3eb06b6 [subset] GPOS Lookup Type 3: CursivePos 2019-09-25 05:43:25 +09:00
Ebrahim Byagowi 0665dce116 [fuzzer] Don't process output in debug mode as it causes timeout 2019-09-21 17:36:33 +04:30
Qunxin Liu bf66d1bf58 [subset] Add integration tests for cmap14 2019-09-20 07:55:11 +09:00
Evgeniy Reizner 7d4da8b862 Remove duplicated tests from test-ot-tag (#1958) 2019-09-06 12:24:32 -04:00
Behdad Esfahbod 52d19ba459 Minor 2019-09-04 11:28:40 -04:00
Ebrahim Byagowi d3b984d379 Revert in-house pow10 (d80a3ea) and fix oss-fuzz/16922
Probably can be fixed but merging it was wrong so let's revert.
2019-09-02 18:28:03 +04:30
Ebrahim Byagowi 28620310b8
[test] Avoid alloca use as clang complain
Fixes https://circleci.com/gh/harfbuzz/harfbuzz/108171 complain
2019-08-29 14:55:54 +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 a0b4ac4dce Turn 8 spaces to tab across the project
According to the current code style of the project
2019-08-27 02:40:41 +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 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
Behdad Esfahbod 163a66dc73 [test] Add test for aaa85931f3 2019-08-20 14:22:57 -07:00
Ebrahim Byagowi d59d89b281
[test] Rebase 10.14 trak related test 2019-08-20 13:07:17 +04:30
Ebrahim Byagowi 37de38adea
Merge branch 'master' into remove-coretext-96dpi-assumption 2019-08-20 12:59:33 +04:30
Khaled Hosny da5118da77 [ot-shape] Enable abvm/blwm features by default
Core Text seems to apply them to Latin text, but Uniscribe doesn’t.

See https://github.com/harfbuzz/harfbuzz/pull/1908#issuecomment-521819343
2019-08-16 02:17:32 +02:00
Khaled Hosny 2164bd6f29
[ot-shape] Enable dist feature by default (#1908)
Fixes https://github.com/harfbuzz/harfbuzz/issues/1907
2019-08-16 00:28:41 +02:00
Behdad Esfahbod e56d4ff43b Rename hb_ot_meta_get_entries() to +hb_ot_meta_get_entry_tags() 2019-08-13 21:02:47 -07:00
Ebrahim Byagowi b31d627f15
Increase subset fuzzer timeout to 16s
To satisfy -valgrind and -tsan bots, very ugly
2019-08-11 23:34:48 +04:30
Qunxin Liu 321d5588d4 [subset] Add subsetting for GPOS Lookup Type 1: Single Adjustment Positioning Subtable 2019-08-06 14:06:35 -07:00
Qunxin Liu 37572882e7 [subset] cmap table to use _subset2 and new iterator frameworks 2019-08-05 11:26:34 -07:00
Ebrahim Byagowi 8c0a2e68ad
[fuzz] Add dummy call of the added APIs (#1886) 2019-07-30 13:16:15 +04:30
Ebrahim Byagowi 9f2b4956b4
[base] Add hb_ot_layout_get_baseline API 2019-07-30 04:42:51 +04:30
Ebrahim Byagowi 40a4b6ddbd [var] Add a new API, hb_font_set_var_named_instance 2019-07-29 16:23:47 -07:00
Ebrahim Byagowi b6a2281f1a [meta] Make values match their enum type naming 2019-07-30 03:48:23 +04:30
Ebrahim Byagowi 20072a2eca [metrics] Make values match their enum type naming 2019-07-30 03:48:23 +04:30
Ebrahim Byagowi 2c2a2b97db [meta] Rename hb_ot_meta_t to hb_ot_meta_tag_t 2019-07-29 22:43:09 +04:30
Ebrahim Byagowi e21bdf500d
Increase subset fuzzer timeout to 8s
Probably we should just remove timeout when running tsan and vaglrind here, the flaky bots
2019-07-28 22:59:09 +04:30
Ebrahim Byagowi 62932c14bd [meta] Rename ot-metadata to ot-meta per review 2019-07-25 17:49:51 -07:00
Ebrahim Byagowi bc65ebbce7 [meta] hb_ot_metadata_get_entries, tags iteration API 2019-07-25 17:49:51 -07:00
Ebrahim Byagowi 3ac03bd67c [meta] New API, hb_ot_metadata_reference_entry for fetching meta entries 2019-07-25 17:49:51 -07:00
Ebrahim Byagowi 356b68a00a
[metrics] Add a test that actually practices variation (#1858) 2019-07-25 23:22:00 +04:30
Khaled Hosny 04c11a19b7
Merge pull request #1851 from khaledhosny/fix-sbix-extents
Fix sbix glyph extents
2019-07-22 16:44:47 +02:00
Ebrahim Byagowi a51aa951b5
[metrics] Fix _get_variation API to works with actual coord values 2019-07-22 18:35:55 +04:30
Khaled Hosny c9796d15e1 Fix sbix glyph extents
* The ‘height’ needs to be negated since the API returns “distance from
  top to bottom side”.
* Similarly, the ‘y_offset‘ needs to be added to the height to get the
  ‘y_bearing’, since sbix’s offset is “the point in the glyph relative
  to its lower-left corner which corresponds to the origin” while
  ‘y_bearing’ is the “top side of glyph from origin”.

With these changes the sbix glyph metrics return values similar to other
tables, as they were otherwise unusable.
2019-07-22 05:42:34 +02:00
Ebrahim Byagowi bdfdac0f26
[ci][fuzzer] print valgrind failure if an error happened 2019-07-19 10:33:00 +04:30
Ebrahim Byagowi 87e628436e Implement a simple API for fetching opentype metrics
Fixes https://github.com/harfbuzz/harfbuzz/pull/1432
2019-07-18 14:15:58 -07:00
Qunxin Liu 1da1b4dc94 [subset] For option "--unicodes", add support for "*" to retain all code points 2019-07-15 11:18:50 -07:00
Ebrahim Byagowi f8242b61ab
[fuzz] Increase subset runner timeout for tsan bot
Now is flaky let's just increase and maybe investigate later
2019-07-11 15:10:36 +04:30
Ebrahim Byagowi b65bad18aa
[fuzz] Don't fail when blob is empty
And enable more tests able to trig the issue.
2019-07-11 14:31:55 +04:30
Ebrahim Byagowi c85f624b51 Force blob generation and memory check in hb-subset-fuzzer 2019-07-10 23:38:07 +04:30
Behdad Esfahbod f53590971c [test] Make Unicode tests strict against internal UCD
https://github.com/harfbuzz/harfbuzz/pull/1799
2019-06-27 13:42:51 -07:00
David Corbett d42264f151 Test at least one character per Unicode version 2019-06-27 13:38:03 -07:00
Michiharu Ariza 8341c0b304 add test case file 2019-06-27 08:43:31 -07:00
Michiharu Ariza 82d4bfb8f3 enable cff subset tests
add Unicode UCS-4 cmap
fix Unicode bits in OS/2
add Unicode cmap sub-table in SourceHanSans-Regular_subset.otf
regenerate cff subset test expected results
2019-06-14 11:08:59 -07:00