src/hb-cff-interp-common.hh


Log

Author Commit Date CI Message
Behdad Esfahbod d2a88fbd 2025-02-12T21:48:22 [vector] Add alloc_exact()
Behdad Esfahbod 361d30e2 2024-05-23T21:44:28 [CFF] Ignore unknown operators Fixes https://github.com/harfbuzz/harfbuzz/issues/4558
Behdad Esfahbod cb320d22 2023-07-27T10:43:07 Revert "[cff] Use float instead of double" This reverts commit c8f67ac28eb18e65adda75818e2c472ad3936874. Tests failing.
Behdad Esfahbod c8f67ac2 2023-07-27T10:34:45 [cff] Use float instead of double Reduces memory usage slightly.
Behdad Esfahbod a55d0b88 2023-06-06T17:13:09 [subset/cff] Inline type only used once
Behdad Esfahbod 054f966a 2023-06-03T22:52:16 [subset/cff1] Don't allocate memory for retaingid holes 40% speedup in BM_subset/subset_glyphs/SourceHanSans-Regular_subset.otf/retaingids/10 benchmark.
Behdad Esfahbod d5e1748f 2023-01-02T12:26:43 [cff] Simplify add_op()
Behdad Esfahbod d3ed6eed 2023-01-01T23:29:35 [cff] Initialize a member variable For good hygiene.
Behdad Esfahbod 0ec0214f 2022-12-31T13:18:32 [cff-subset] Adjust pre-allocation Reduces memory use significantly.
Behdad Esfahbod d480ae1f 2022-11-24T13:53:43 [cff] Remove unused function
Behdad Esfahbod dcce53dd 2022-11-23T13:19:38 [cff] Micro-optimize fetch_op
Behdad Esfahbod 59c45f6d 2022-11-22T12:54:50 Use hb_memcpy instead of memcpy consistently
Behdad Esfahbod 13e1ca9e 2022-11-22T12:19:28 [cff] Micro-optimize memcpy
Behdad Esfahbod 28e767dd 2022-11-21T21:59:51 [subset-cff] Really optimize op_str_t / parsed_cs_op_t layout Now parsed_cs_op_t and op_str_t are both 16 bytes. Saves another 7% in SourceHanSans/10000 benchmark.
Behdad Esfahbod 4f056b92 2022-11-21T21:37:38 [subset-cff] Optimize op_str_t layout
Behdad Esfahbod dc3bb5e0 2022-11-21T18:18:48 [subset-cff] Pre-allocate values array for subroutines as well
Behdad Esfahbod 59451502 2022-11-21T15:23:16 [cff] Optimize env error checking
Behdad Esfahbod d9de515a 2022-11-21T14:23:07 [cff] Optimize byte_str_ref_t array access
Behdad Esfahbod a81ec9b2 2022-11-21T14:03:28 [cff] Optimize byte_str_ref_t inc() Shows a couple percent speedup.
Behdad Esfahbod 6905d36d 2022-11-21T10:51:33 [cff] Fix fetch_op() bounds-checking
Behdad Esfahbod b51ab1a9 2022-11-21T10:27:07 [cff] Optimize byte_str_ref_t Make it 16 bytes instead of 24. This struct is used in the subroutine call stack heavily. This change makes the HB AdobeVFPrototype benchmark to become faster than FT one, with about 6% speedup as a result of this change.
Behdad Esfahbod 7a39464b 2022-11-21T09:48:54 [cff] Hide members of byte_str_ref_t
Behdad Esfahbod 18141f00 2022-11-21T09:47:03 [cff] Move a sub_array call No logic change.... I hope?!
Behdad Esfahbod f66415cd 2022-11-21T09:39:27 [cff] Move initialization of a type to constructor
Behdad Esfahbod 602e0ca7 2022-05-16T10:14:34 [cff] Minor restructure of struct Surprisingly this shows tiny benchmark improvement consistently.
Behdad Esfahbod acdab17e 2022-05-13T14:14:36 [cff] Cosmetic in parsed_values_t
Behdad Esfahbod f0853796 2022-05-11T12:10:03 [cff-subset] Pre-alloc vector for operator decoding
Behdad Esfahbod bff78e65 2022-05-10T16:33:37 [cff] Convert interpretation environment to use constructor
Behdad Esfahbod 0a42410d 2022-05-10T12:05:19 [cff2] Change extents/shape stack to be just a number Do the blending immediately. Fixes https://github.com/harfbuzz/harfbuzz/issues/3559 Benchmark on AdobeVFPrototype shows 35% speedup. Now we're faster than FreeType: Benchmark Time CPU Time Old Time New CPU Old CPU New ------------------------------------------------------------------------------------------------------------------------------------------------ BM_Font/glyph_extents/AdobeVFPrototype.otf/hb -0.3792 -0.3792 1584 983 1581 982 BM_Font/glyph_extents/AdobeVFPrototype.otf/ft +0.0228 +0.0224 1220 1248 1218 1245 BM_Font/glyph_extents/AdobeVFPrototype.otf/var/hb -0.3513 -0.3518 1616 1048 1613 1046 BM_Font/glyph_extents/AdobeVFPrototype.otf/var/ft +0.0172 +0.0169 1232 1254 1230 1251
Behdad Esfahbod 1b14d2ff 2022-05-09T18:15:31 [cff] Fix arg-stack peek() impl
Behdad Esfahbod 6106ef8c 2022-05-09T18:12:09 [cff] Tighten up arg-stack access
Behdad Esfahbod 8c616a6e 2022-05-09T17:49:54 [cff] Allocate stack inline instead of using hb_vector_t Speeds up glyph_extents and glyph_shape benchmarks for CFF by 10 to 16 percent!
Behdad Esfahbod c941ece6 2022-05-09T16:20:22 [cff] Use using instead of typedef
Behdad Esfahbod 8aa54aac 2022-05-09T16:09:56 [cff] Replace byte_str_t with hb_bytes_t use
Behdad Esfahbod fe1d85a5 2022-05-09T16:04:52 [cff] Remove custom byte_str_t impl
Behdad Esfahbod fe783ac0 2022-01-18T13:38:28 [cff] Remove op_str_t nop init/fini
Behdad Esfahbod 8d24ac26 2022-01-18T13:14:42 [cff] Remove init/fini from number_t
Behdad Esfahbod 6ef83c2c 2022-01-18T13:08:34 [vector] Remove .fini_deep()
Garret Rieger b14475d2 2021-03-18T10:51:26 [subset] further changes to serializer error handling. - Rename enum type and enum members. - in_errors() now returns true for any error having been set. hb-subset now looks for offset overflow only errors to divert to repacker. - Added INT_OVERFLOW and ARRAY_OVERFLOW enum values.
Garret Rieger 73ed59f7 2021-03-17T15:53:10 [subset] store errors in the serializer as a flag set. Make check_assign/check_equal specify the type of error to set.
Ebrahim Byagowi 2be859d2 2020-04-20T23:48:23 minor, replace nullptr checks with implicit ones
Ebrahim Byagowi 2dda6dd7 2020-04-20T14:12:45 minor, tweak spacing turn 8 spaces to tab, add space before Null/Crap
ariza 002f0e20 2020-02-27T17:34:26 reimplment serialize_int using check_assign()
Ebrahim Byagowi 5179b969 2019-10-08T11:09:12 [cff] minor on number_t
Ebrahim Byagowi 9fea6b4d 2019-07-05T18:46:41 [amalgam] Use it in cmake port and fix conflicts (#1812)
Ebrahim Byagowi 9db7ce73 2019-06-28T23:11:52 minor style improve in hb-cff-interp-common.hh
Michiharu Ariza dd4c3752 2019-04-18T10:38:57 silence MVC warnings
Behdad Esfahbod b986c6a3 2019-03-29T20:17:46 [C++11] Remove IntType::set() in favor of operator=
Behdad Esfahbod 70a52d6b 2019-01-22T12:15:23 Convert all other enum class consts to static constexpr Fixes https://github.com/harfbuzz/harfbuzz/issues/1553
Behdad Esfahbod 380c3cff 2019-01-20T19:51:08 Use enum for class constant
Behdad Esfahbod dd7c628e 2019-01-20T19:51:08 Use enum for class constant
Behdad Esfahbod fa333e34 2018-12-27T17:56:22 [vector] Remove static_array Was good idea, but with C++ types with constructor/destructor, was getting in the way as compiler was destructing those items where it was not desired. Since C++ does not allow zero-sized arrays, just remove it...
Michiharu Ariza 29f0b6bc 2018-12-22T07:47:04 CFF renaming (#1507) * reimplement ByteStr as byte_str_t based on hb_ubytes_t Unuse start_embed<ByteStr> Also renamed SubByteStr to byte_str_ref_t More renaming to come * substr renamed to str_ref in line with its type byte_str_ref_t * uncamelize non-table struct names * uncamelized non-struct types OpCode etc * add byte_str_t copy ctor * test * test2 * undo tests * fix bot failure * undo the previous change * fixed tabs, added inline * Revert "fixed tabs, added inline" This reverts commit 21163c30e9d18759414f7fe2518628241599f039. * fix tabs
Behdad Esfahbod 474a1205 2018-12-21T18:46:51 [array/vector] Rename len to length
Ebrahim Byagowi e4120085 2018-12-17T21:31:01 Remove redundant void from C++ sources (#1486)
Ebrahim Byagowi b2ebaa9a 2018-12-16T22:38:10 Remove redundant 'inline' from methods (#1483)
Michiharu Ariza 2941208f 2018-12-11T12:21:24 [CFF] oss-fuzz issue 11690 ASSERT: substr.offset >= opStart (#1461) * fix oss-fuzz 11690: substr.offset >= opStart detect recursive subroutine call & handle as error * fix build failure * add minimized test case for oss-fuzz 11690 * removed asserts
Michiharu Ariza 59345cde 2018-12-06T13:36:26 [CFF] Refix oss-fuzz 11714: set_blends (PR #1458) (#1460) * pass subarray of stack to set_blends * get_subarray to return a value, not ref * restored error check (with tweak)
Michiharu Ariza 6708c559 2018-12-05T12:51:18 fix oss-fuzz issue 11675 (ASSERT: count <= str.len) Also added an additional error check to avail ()
Michiharu Ariza 5fff6ab0 2018-12-03T16:06:58 additional precision made a difference in extents test
Michiharu Ariza 9e5180cd 2018-12-03T15:32:42 more double changes
Michiharu Ariza 9af33d7a 2018-12-03T14:48:46 Number to use double for all types
Behdad Esfahbod 825df6db 2018-11-30T23:04:59 [CFF] Change spaces to tabs
Behdad Esfahbod 592f39b3 2018-11-30T22:54:57 [CFF] Whitespace
Michiharu Ariza 471db3aa 2018-11-28T17:06:11 workaround for issue #1417
Michiharu Ariza 3787c078 2018-11-14T13:38:03 Implemented seac for extents & subset along with API tests
Michiharu Ariza 0dfa584c 2018-11-12T08:47:07 changed Adobe company name
Michiharu Ariza 0b287008 2018-11-01T22:43:17 removed unused code
Michiharu Ariza b1d0c589 2018-11-01T16:33:46 removed extraneous ;s
Michiharu Ariza d56e338a 2018-10-31T22:30:34 CFF1 no-desubroutinize + no-hinting no-desubroutinize option is disabled for now code cleanup (esp. CFF1 width handling) bug fixes & renaming
Michiharu Ariza 36c2c374 2018-10-23T15:11:09 removed unused multi_val from DictVal
Michiharu Ariza 6420ffe0 2018-10-15T14:03:18 fixed type casting bug
Michiharu Ariza 7d99a6ce 2018-10-12T02:16:07 overhauled error handling in CFF interpreter minimized "if (error) return false" idiom
Michiharu Ariza 83c5298f 2018-10-09T21:59:36 added cff1_legacyops.otf as test-ot-extents-cff test case fixed roll operator bugs uncovered by the test
Michiharu Ariza b51418f5 2018-10-08T15:05:36 added CFF2 get_extents added source hb-ot-cff2-table.cc augmented VariationData to return scalars misc bug fixes, renaming, cleanup
Michiharu Ariza e7a045e4 2018-10-04T14:16:07 fixed leak exposed by test-ot-extents-cff
Michiharu Ariza 0222d57c 2018-10-04T09:37:57 tweaked previous warning fixes
Michiharu Ariza 3ef35890 2018-10-03T18:08:25 fixed warnings
Michiharu Ariza eed7e6bb 2018-10-02T13:45:14 redefine OpCodes as define instead of enum in order to eradicate duplicate enum warnings
Michiharu Ariza 76e54d2b 2018-09-21T12:16:36 fixed subroutinized CFF2 flattening and some code cleanup
Michiharu Ariza c0c85b85 2018-09-17T11:14:56 implemented get_glyph_extents with CFF1 Implemented path operators in a new struct PathProc hooked up to CSOpSet Added current point to CSInterpEnv
Michiharu Ariza bb38d0f6 2018-09-11T10:43:15 Implement parse_bcd
Michiharu Ariza 1666b89e 2018-09-10T16:00:20 subset CFF1 String Index Repurposed FDMap as Remap then subclassed for remapping SIDs misc code cleanup
Michiharu Ariza f2d299b0 2018-09-04T10:25:21 Drop hints from CFF2 charstrings Templatized ArgStack so it may store the default value along with blend deltas as BlendArg while parsing blend operator arguments in CFF2 charstring Added get_region_count() method to VarRegionList & VariationStore
Michiharu Ariza fcf17788 2018-08-31T16:28:47 templatized ArgStack as a prep to store blends
Michiharu Ariza 968168bf 2018-08-31T13:28:16 drop hints from CFF1 charstrings renamed confusing Stack.size to Stack.count
Michiharu Ariza 1d1afddf 2018-08-29T13:36:39 corrected preprocessor guards
Michiharu Ariza 8af9690a 2018-08-29T13:26:17 Merge branch 'master' into cff-subset Renamed cff "private" source/headers without the suffix