Commit Graph

77 Commits

Author SHA1 Message Date
Garret Rieger 21a181af2b [subset] sketch out support for a call that lists all codepoints present in a font. Implement support for it in format 4 cmap sub table. 2018-04-16 16:29:26 -06:00
Garret Rieger 1c3372786c [subset] fix infinite loop bug in looping through tables for subsetting. 2018-03-27 13:47:42 -06:00
Garret Rieger 07851aae9d [subset] Couple of fixes for fuzzer discovered issues. (#924)
* [subset] sanitize individual DeviceRecord's as part of hdmx sanitization.

* [subset] Fix out of bounds read with non-two byte align glyphs.

* [subset] Just use size_device_record >= DeviceRecord::min_size.

* [subset] Add TODO.

* [subset] Re-order checks in hdmx sanitize.
2018-03-26 19:56:56 -07:00
Behdad Esfahbod e4d1cbfb4f Add HB_SUBSET_BUILTIN
Fixes https://github.com/harfbuzz/harfbuzz/issues/865
2018-03-26 14:09:29 -07:00
Garret Rieger 7251181b56 [subset] Fix infinite loop in there are more then 32 tables. 2018-03-20 19:47:36 -06:00
Garret Rieger 39b2f69fab [subset] Drop the same tables by default as fontTools does. 2018-03-08 16:30:36 -08:00
Garret Rieger dd10769993 [subset] drop all glyph names from the post table. 2018-03-07 11:36:54 -08:00
Garret Rieger 91867cda6a [subset] cleanup. 2018-03-07 10:17:06 -08:00
Garret Rieger 0e8f9430c8 [subset] Skip subsetting vhea. 2018-03-07 10:03:52 -08:00
Garret Rieger 64cf53d619 [subset] Subset vmtx if present. 2018-03-07 10:03:52 -08:00
rsheeter 4a1d51ef15
Merge pull request #818 from googlefonts/drophints
[subset] Drop hints
2018-02-26 20:23:41 -08:00
Behdad Esfahbod df1c7d5b60 Minor 2018-02-25 19:06:25 -08:00
Rod Sheeter d78393b554 Merge branch 'master' of https://github.com/harfbuzz/harfbuzz into drophints 2018-02-23 17:53:26 -08:00
Behdad Esfahbod dc5c7927e7 [subset] Caclculate head table checksum adjustment
Test still fails, because we do not serialize tables in the same
order that fonttools subsetter does.
2018-02-23 16:59:53 -08:00
Garret Rieger 66b0a39079 [subset] Fix memory leak in hb-subset. 2018-02-23 15:41:52 -08:00
Garret Rieger 5a36b55fba [subset] Fix memory leak in subset face destroy. 2018-02-23 15:30:14 -08:00
Rod Sheeter 9bd6d25254 [subset] clone trim logic from fonttools glyf handling 2018-02-23 13:05:58 -08:00
Garret Rieger ec302ad5bd [subset] Fail subset if a table fails to sanitize. 2018-02-22 15:42:39 -08:00
Garret Rieger aa4aa2353c [subset] Enable hdmx subsetting. 2018-02-22 15:42:39 -08:00
Garret Rieger fe42862ab3 [subset] Sketch out a basic hb-ot-hdmx.hh. 2018-02-22 15:42:39 -08:00
Rod Sheeter 2d0265242b [subset] keep the result of _subset 2018-02-21 17:04:24 -08:00
Rod Sheeter 74e0c13a4a [subset] drop hint tables if so flagged. Still need to dump glyf instructions. 2018-02-21 11:19:18 -08:00
Rod Sheeter 7ecca8c0a8 [subset] keep the result of _subset 2018-02-21 09:42:46 -08:00
Garret Rieger e3e0ac9823 [subset] Move glyf subsetting code into hb-ot-glyf-table.hh 2018-02-20 14:07:40 -08:00
Behdad Esfahbod 0bff6991de Ugh. Really fix build. 2018-02-19 11:51:25 -08:00
Garret Rieger e330ef3711 [subset] Restore hb_face_data_destroy to be internal. 2018-02-14 15:57:18 -08:00
Rod Sheeter 3ed70e5e64 [subset] return bool not hb_bool_t from table::subset 2018-02-14 15:24:49 -08:00
Rod Sheeter d463e9f6b5 [subset] Give Behdad credit again 2018-02-14 15:04:15 -08:00
Rod Sheeter fa87770372 [subset] First pass at hmtx 2018-02-14 14:53:10 -08:00
Garret Rieger d008b62887 Merge remote-tracking branch 'upstream/master' into fixed 2018-02-14 10:38:52 -08:00
Garret Rieger 89f17e3965 [subset] capitalize dsig. 2018-02-14 10:19:50 -08:00
Garret Rieger df6d780355 [subset] Extract maxp subsetting into hb-ot-maxp-table. 2018-02-14 10:19:50 -08:00
Garret Rieger 24904383df [subset] Correct usFirstCharIndex and usLastCharIndex in OS2 table when subsetting. 2018-02-14 10:19:50 -08:00
Behdad Esfahbod d5b33f2fe1 [subset] hb_subset_input_t changes 2018-02-13 13:55:10 -08:00
Behdad Esfahbod 3d66f441cc [subset] Remove unreachable code
sanitizer.sanitize never return nullptr.
2018-02-12 18:43:42 -08:00
Rod Sheeter 1330edc4fe Use functions to get new gids. Avoid 0; fonttools drops it from cmap. 2018-02-12 14:29:23 -08:00
Rod Sheeter 692f86e569 drop GDEF, GPOS, GSUB, and dsig 2018-02-12 11:30:57 -08:00
Garret Rieger 83e1ef9215 [subset] Set the new number of glyphs in maxp. 2018-02-12 11:22:50 -08:00
Garret Rieger 5df080bf15 Destroy the subset plan at the end of subsetting. 2018-02-12 10:15:59 -08:00
Rod Sheeter ebd31d376d subset for real 2018-02-12 10:10:08 -08:00
Ebrahim Byagowi 203b647530 Favor use of static instead HB_INTERNAL 2018-02-10 15:44:09 -06:00
Behdad Esfahbod 43314ff4c0 More fixes
test-subset-glyf still failing. No idea why :(
2018-02-10 15:40:03 -06:00
Behdad Esfahbod a981d798ea Fix more build issues
Hopefully most bots come back with this...
2018-02-10 15:19:27 -06:00
Ebrahim Byagowi 6c4ca6135a
Hide more symbols of hb-subset (#771) 2018-02-11 00:42:06 +03:30
Behdad Esfahbod bfa871634c Minor 2018-02-10 14:06:53 -06:00
Ebrahim Byagowi 844f48ea9a
Fix symbol exporting and libstdc++ linkage of hb-subset (#769) 2018-02-10 23:13:12 +03:30
Rod Sheeter 9275bd03ea First pass at building a cmap 2018-02-09 17:40:52 -08:00
Garret Rieger d2170d1478 Check for failures from add table. 2018-02-09 17:27:23 -08:00
Garret Rieger 86aa4b3ba7 Return empty face on hb_subset failure instead of null. Plus some minor cleanups for _add_head_and_set_loca_version 2018-02-09 13:54:43 -08:00
Garret Rieger 1582eabee6 Update head table with loca format selected by glyf+loca subsetting. 2018-02-09 12:52:08 -08:00