Commit Graph

68 Commits

Author SHA1 Message Date
Behdad Esfahbod 4be074e2cb [gvar] Whitespace 2022-06-27 16:12:42 -06:00
Behdad Esfahbod a96647841a [gvar] Optimize apply_deltas_to_points 2022-06-27 15:41:02 -06:00
Behdad Esfahbod e9af9062c0 [gvar] Optimize unpack_deltas 2022-06-27 15:38:42 -06:00
Behdad Esfahbod 573e77280b [gvar] Optimize unpack_deltas 2022-06-27 15:35:28 -06:00
Behdad Esfahbod 698f51464c [gvar] Share vector allocation across delta-sets 2022-06-27 15:30:19 -06:00
Behdad Esfahbod 39e280c256 [gvar] Handle a couple of error conditions 2022-06-27 15:28:30 -06:00
Behdad Esfahbod 5be6e5dd57 [gvar] Rewrite linear interpolation 2022-06-27 15:22:16 -06:00
Behdad Esfahbod 57519b532d [gvar] Use pointer-to-member instead of function 2022-06-27 15:18:56 -06:00
Behdad Esfahbod ab15fe082a [gvar] Handle a couple of error conditions 2022-06-27 15:13:10 -06:00
Behdad Esfahbod b7e9e8785c [gvar] Optimize deltas and points loading 2022-06-27 15:09:25 -06:00
Behdad Esfahbod 97cbc2d40a [gvar] Remove condition that font num_coords should match gvar's 2022-06-27 12:37:11 -06:00
Behdad Esfahbod 95bfa0913d [gvar] Optimize translate() 2022-06-27 12:10:16 -06:00
Behdad Esfahbod 9f067582b8 [gvar] Optimize transform() 2022-06-27 12:10:16 -06:00
Behdad Esfahbod cfc57ef862 [glyf] Optimize contour_point_t layout 2022-06-27 12:10:16 -06:00
Behdad Esfahbod 75ca78a6bb [glyf] Optimize hb_contour_points_t::extend 2022-06-27 12:10:16 -06:00
Behdad Esfahbod 30d58bfd0f [glyf] Don't translate/transform components if has no effect 2022-06-26 16:49:40 -06:00
Behdad Esfahbod 9ce9773040 [glyf/SimpleGlyph] Minor use constructor for contour_point_t 2022-06-26 13:08:37 -06:00
Behdad Esfahbod dd71d2c1c3 [gvar] Protect against offset underflow 2022-05-06 13:02:26 -06:00
Behdad Esfahbod 9a6dabd61a [gvar] Remove sanitize check for data array
We are not checking in sanitize that offset array is ascending,
so this check was bogus.
2022-05-06 12:43:45 -06:00
Behdad Esfahbod 38478d1061 [gvar] DEFINE_SIZE_ARRAY instead of DEFINE_SIZE_MIN 2022-05-06 12:43:45 -06:00
Behdad Esfahbod 90d278c92e [gvar] Remove requirement that num_glyphs matches the font's 2022-05-06 12:43:45 -06:00
Behdad Esfahbod ca8a0f3ea3 [gvar] Protect against out-of-range access
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=47281
Fixes https://oss-fuzz.com/testcase-detail/5508865908670464
2022-05-06 11:54:38 -06:00
Behdad Esfahbod 3a78cf92c8 [gvar] Fix decoding of private vs shared points
Fixes https://github.com/harfbuzz/harfbuzz/issues/3506
2022-03-25 13:25:28 -06:00
Behdad Esfahbod ac1bb3e39e [machinery] Move accelerators to constructor/destructor 2022-01-20 12:10:05 -07:00
Behdad Esfahbod e062376ef1 [machinery] Make accelerator lazy-loader call Xinit/Xfini
Instead of init/fini. To isolate those functions. To be turned into
constructor/destructors, ideally one per commit (after some SFINAE
foo.)
2022-01-19 17:09:34 -07:00
luz paz e2e305066a Fix various typos
Found via `codespell -q 3 -S ./perf/texts -L actualy,ba,beng,fo,gir,inout,nd,ot,pres,ro,te,teh,timne`
2022-01-16 05:39:03 -08:00
Garret Rieger 46d4a5e673 [subset] Convert subset plan to use a flags bit set. 2021-07-29 18:02:34 -07:00
Qunxin Liu d07f789ae3 [subset] support option "--notdef-outline" 2021-06-18 15:35:02 -07:00
Behdad Esfahbod ad28f973f3 Rename offset types to be explicit about their size
Add Offset16To<>, Offset24To<>, and Offset32To<> for most use-cases.
2021-03-31 13:00:07 -06:00
justvanrossum 1d8a89504b do not round added deltas; fixes #2866 2021-02-19 16:53:21 -07:00
ebraminio 732a9164d9
[gvar] minor 2020-08-11 16:37:55 +04:30
Ebrahim Byagowi 0907c10214
[gvar] minor 2020-08-07 00:15:32 +04:30
Ebrahim Byagowi 02d1ec1658
[gvar] Don't fail on imprefect gvar
No need to fail even if gvar doesn't have that much glyphs
2020-08-06 22:18:35 +04:30
Ebrahim Byagowi ec17b62457
[var] Apply variations on empty glyphs
It was ignoring empty glyphs for no good reason, this fixes it.

Fixes #2618
2020-08-06 20:16:11 +04:30
Ebrahim Byagowi 5cab55ca90
[gvar] minor 2020-08-06 18:54:58 +04:30
Ebrahim Byagowi d0e2addd43 minor 2020-07-18 22:16:02 +04:30
Ebrahim Byagowi 648338c7d4 [gvar] Add fields docs from ot-spec as other tables 2020-03-10 13:20:56 +03:30
Ebrahim Byagowi 1b3b96973b [gvar] Don't copy shared tuples into gvar's accelerator 2020-03-10 12:46:09 +03:30
Ebrahim Byagowi 29dd1fe506 [gvar] Don't check again against face num glyph
Done once by sanitize_shallow
2020-03-10 11:41:58 +03:30
Ebrahim Byagowi d4b1181760 [gvar] minor, rename gvar_table to table 2020-03-10 11:29:56 +03:30
Ebrahim Byagowi 5c37693864 [gvar] Remove axisCount comparison with fvar as we runtime check that 2020-03-10 11:25:47 +03:30
Ebrahim Byagowi 9004848560 [gvar] Make sure font's num_coords matches with gvar.axisCount 2020-03-04 12:43:26 +03:30
Ebrahim Byagowi 1af3363f9e [gvar] Use hb_array_t instead indexing raw pointers 2020-03-04 12:43:26 +03:30
Ebrahim Byagowi 99b5b3f1b1 [gvar] Make sure TupleVarHeader has the needed size
Fixes https://crbug.com/oss-fuzz/21026
2020-03-04 12:43:26 +03:30
Ebrahim Byagowi 60262e4ca9 [var] Build end-points array on gvar itself 2020-02-29 22:57:59 +03:30
Ebrahim Byagowi 44169f3396
[draw] Fix invalid rendering of some glyph on Estedad-VF
Basically reverts 11f3fca so I can do the same tested and better later

Fixes #2215
2020-02-29 16:04:03 +03:30
Ebrahim Byagowi e642aab116
[subset] Add source_blob as a hb_subset_context_t field (#2203)
So no more double sanitizing source table.
2020-02-28 22:24:25 +03:30
Ebrahim Byagowi 61208401f4
[gvar] Use hb_bytes_t.check_range instead having in house one
And use TupleVarHeader calculated size for validity check.

Fixes https://crbug.com/oss-fuzz/20919 and possibly other gvar related issues
2020-02-28 21:09:07 +03:30
Ebrahim Byagowi 14b134379d [gvar] Minor, check whether sub_array result also have enough room 2020-02-27 21:01:48 +03:30
Ebrahim Byagowi 8eba66c1c6 [gvar] Fix invalid memory access by refactoring GlyphVarData fetch logic
Fixes https://crbug.com/oss-fuzz/20906
2020-02-27 20:26:54 +03:30