Commit Graph

110 Commits

Author SHA1 Message Date
Behdad Esfahbod a1e5e07c73 [subset] Hook up GSUB/GPOS, but still disabled
They are still in the drop list.
2018-09-05 16:24:28 -07:00
Behdad Esfahbod aba0a945c5 [subset] Add hb-subset-input.hh and make hb-subset.hh toplevel include 2018-08-31 13:25:19 -07:00
Behdad Esfahbod 93fe0faaee [subset] Clean up hb_subset_input_t API 2018-08-29 18:24:03 -07:00
Behdad Esfahbod d237ce7181 [subset] Bail if subsetting a table failed 2018-08-29 18:13:52 -07:00
Behdad Esfahbod f39166f0c0 [subset] Remove unused hb_subset_profile_t
We might reintroduce it later, but for now remove, as it was unused.
Some things that should have been in this object (drop_hints, etc)
are already in hb_subset_input_t.  So, for now, keep everything there.
2018-08-29 18:09:55 -07:00
Behdad Esfahbod dae39c58fb [face] Introduce character-map API
New API:
+hb_face_collect_unicodes
+hb_face_collect_variation_selectors
+hb_face_collect_variation_unicodes
2018-08-25 22:44:39 -07:00
Behdad Esfahbod c77ae40852 Rename hb-*private.hh to hb-*.hh
Sorry for the noise, downstream custom builders.  Please adjust.
2018-08-25 22:36:36 -07:00
Behdad Esfahbod b09a0336ca [cmap] More hb_auto_t<>(...) 2018-08-25 22:04:39 -07:00
Behdad Esfahbod 1dcf5fb038 [cmap Add hb_subset_collect_variation_unicodes()
To be moved to hb-face.h later.
2018-08-25 16:12:18 -07:00
Behdad Esfahbod 4806b3800d [cmap] Add hb_subset_collect_variation_selectors()
To be moved to hb-face later.
2018-08-25 15:58:40 -07:00
Behdad Esfahbod d60c465627 Rename get_all_codepoints() to collect_unicodes() 2018-08-25 08:48:42 -07:00
Behdad Esfahbod aadb2a9188 Add face-builder
New API:
+hb_face_builder_create
+hb_face_builder_add_table
2018-08-25 08:18:53 -07:00
Behdad Esfahbod b912fbea17 Remove most uses of direct comparison to Null objects 2018-08-06 06:38:59 -07:00
Behdad Esfahbod ed7b2e58fc Remove OT namespace from hb-machinery-private.hh 2018-08-02 00:08:08 -07:00
Behdad Esfahbod 9583e0077d Port more off of Sanitizer<> 2018-07-22 22:43:25 -07:00
Behdad Esfahbod be458eb059 Include more basic internal headers from hb-private.hh 2018-07-10 14:41:04 +02:00
Behdad Esfahbod bddeb2b10c Minor renamings of internal inline functions 2018-07-10 14:13:21 +02:00
Behdad Esfahbod cc0b04f48f [subset] Remove HB_SUBSET_BUILTIN
Just include hb-static.cc in libharfbuzz-subset.so source list as
well.  Those building it built-in will include hb-static.cc once
already.  No need for any gymnastics.
2018-06-12 18:24:54 -04:00
Behdad Esfahbod b8e406f0c7 More fixes for SunStudio 12.6 build
Followup to https://github.com/harfbuzz/harfbuzz/pull/1053
2018-06-10 17:22:38 -04:00
Garret Rieger a5673da9be [subset] Add drop_ot_layout setting to subset input. 2018-06-08 12:09:34 -06:00
Behdad Esfahbod f9abbf83b6 Fix fallout from 975bdd5ef5
Ouch!
2018-06-02 15:46:08 -07:00
Behdad Esfahbod f7515769fd [vector] Use Crap pool in push() as well 2018-06-01 17:48:37 -07:00
Garret Rieger 251cc977e9 [subset] Switch to using hb_map_t inside of hb_subset_plan_t. 2018-05-30 17:23:59 -06:00
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