Commit Graph

87 Commits

Author SHA1 Message Date
Behdad Esfahbod fd3d004231 Move pool definitions to hb-static.cc 2018-05-24 15:58:26 -07:00
Behdad Esfahbod 7f7b1370d3 Fix Uniscribe build
If a pointer type was passed to Null(), reinterpret_cast<> was
complaining about qualifiers being removed. Turns out I need the const on
the other side of "Type" to fix that.  Also remove unused const from
NullPool type.
2018-05-24 14:09:04 -07:00
Behdad Esfahbod f83e992c8b Mark CrapPool thread_local
Not sure if I like to keep it. For now, aim for correctness.
2018-05-24 13:53:02 -07:00
Behdad Esfahbod 5d80129891 Add CrapPool
Common Regoin for Access Protection.  Like the NullPool, but writable.
2018-05-24 13:53:02 -07:00
Behdad Esfahbod 63f57f4dab Mark more unsized array's as arrayZ 2018-05-08 16:56:11 -07:00
Behdad Esfahbod eba1c16a60 Always lock blob in sanitize. Remove blob->lock_as() in favor of blob->lock() 2018-05-08 02:47:42 -07:00
Behdad Esfahbod b4fa505014 Move Sanitizer::lock_instance<>() to blob->lock_as<>(). 2018-05-08 02:45:08 -07:00
Behdad Esfahbod abc12f7b81 Move null pool to hb-private 2018-05-08 02:23:36 -07:00
Behdad Esfahbod 5c3112aec8 s/hb_prealloced_array_t/hb_vector_t/g
Part of https://github.com/harfbuzz/harfbuzz/issues/1017
2018-05-01 19:07:04 -04:00
Behdad Esfahbod a60ba7964e s/finish/fini
For consistency.
2018-05-01 19:01:25 -04:00
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