Commit Graph

272 Commits

Author SHA1 Message Date
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
Garret Rieger 335bbaa66f Remove uneeded code in hb-subset. 2018-02-09 10:55:15 -08:00
Rod Sheeter 59c658c8d5 capture codepoints sorted so we can use them for cmap later. one day we will have a map 2018-02-08 19:22:47 -08:00
Garret Rieger aac7d96212 Apply per table subsetting while building the new face in hb_subset. 2018-02-08 18:18:16 -08:00
Behdad Esfahbod 9682ef135f Minor fixups 2018-02-08 17:35:57 -06:00
Garret Rieger f9c665fed1 Update interface to hb-subset-glyf to subset glyf and loca. 2018-02-08 17:31:11 -06:00
Rod Sheeter 13193a9b97 move to the hb_face_t dest pattern 2018-02-08 17:31:11 -06:00
Rod Sheeter 0859a00669 sketch a subset<T> and call it for cmap. Add subset to cmap, albeit not working even for the msot basic case just yet 2018-02-08 17:31:11 -06:00
Behdad Esfahbod 39b86695cf [subset] Fix thinko 2018-02-07 21:37:03 -06:00
Behdad Esfahbod c479a59988 [subset] Assemble font 2018-02-07 21:26:04 -06:00
Behdad Esfahbod 577becaf7b [subset] Fixup 2018-02-07 17:38:40 -06:00
Behdad Esfahbod 7fd0b61dee [subset] Create new face and copy all tables to it
test-subset fails now because subset-face does not know how to compile itself.
2018-02-07 17:28:43 -06:00
Behdad Esfahbod b87cbe2bec Try fixing build for platforms that have no visibility attributes 2018-02-07 14:11:26 -05:00
Behdad Esfahbod 6804b61d2e [subset] Add hb_subset_face
It's a hb_face_t that has add_table() and in the future knows how to
compile itself into a font blob.
2018-02-07 13:47:35 -05:00
Behdad Esfahbod af02812fc5 [subset] Change hb_subset API to remove hb_subset_face_t 2018-02-07 13:07:46 -05:00
Behdad Esfahbod 2da0d87e76 Remove NullPool visibility hack
We keep a separate private NullPool in libharfbuzz-subset.so
This can fire back later since now there are two separate null objects,
and comparisons to the null pool can be confused.  Something to deal
with when it comes up. Ouch!
2018-02-07 12:44:35 -05:00
Rod Sheeter 91428713bd Remove \ns leftover from fprintf 2018-02-07 12:41:21 -05:00
Rod Sheeter eb485bb9e9 Horrid hack to assign new gids. Use DEBUG_MSG over fprintf 2018-02-07 12:41:21 -05:00
Garret Rieger 53aa0e9542 Add an instance of glyf::accelerator_t to hb-subset-glyf. 2018-02-07 12:41:21 -05:00
Rod Sheeter d0ce3c66e2 Resolve codepoints:glyph ids. Does not compile; undefined reference to OT::_hb_NullPool 2018-02-07 12:41:21 -05:00
Garret Rieger 6a45e5df24 Add skeleton of hb-subset-glyf, call if from hb_subset(...) 2018-02-07 12:41:21 -05:00
Garret Rieger 31ec3c2ec4 Create a subset plan in hb_subset. 2018-02-07 12:41:21 -05:00
Garret Rieger af46a4da5a Move definition of hb_subset_input into hb-subset-private.hh. 2018-02-07 12:41:21 -05:00
Garret Rieger 7481f0ce21 Add codepoints to subset input. 2018-02-07 12:41:21 -05:00
Garret Rieger 8c3a672737 Get test-subset to pass. 2018-02-04 12:57:34 -08:00
Garret Rieger 74d39ed263 Attach add a hb_face_t to hb_subset_face_t. 2018-02-04 12:57:34 -08:00
Garret Rieger a2965f2ea5 Add a basic implementation of hb-subset to enable compilation of test-subset. 2018-02-04 12:57:33 -08:00
Rod Sheeter 9ccb8366f6 Start to sketch APIs for subsetting 2018-02-04 12:57:33 -08:00