src/hb-ot-cff1-table.hh


Log

Author Commit Date CI Message
John Bampton ba686984 2025-03-28T00:09:37 src: fix spelling in code comments Co-authored-by: Max Base <MaxBaseCode@gmail.com>
Behdad Esfahbod 472e65dd 2025-03-18T03:17:49 [cff] Allow empty private dict (again) Fixes https://github.com/harfbuzz/harfbuzz/issues/5162
Behdad Esfahbod 4807a021 2025-03-12T18:27:27 [atomic] Kill hb_atomic_ptr_t<T> Use hb_atomic_t<T *> instead.
Behdad Esfahbod 2032da01 2025-02-18T20:54:56 [ot-font] Centralize painting an outline glyph
Behdad Esfahbod 7a890c2e 2024-09-22T13:19:02 Add hb_barrier() to switches of unions https://github.com/harfbuzz/harfbuzz/pull/4864#issuecomment-2366923736
Behdad Esfahbod 484cb260 2024-05-23T22:20:25 [CFF] Handle error in case of Null used on Unsized type :(
Behdad Esfahbod fa9dc530 2024-02-06T14:44:56 Move CFF Index types to open-type https://github.com/harfbuzz/boring-expansion-spec/blob/main/VARC.md#cff2indexof
Behdad Esfahbod cf3e88e1 2024-02-06T14:40:29 [CFF] Remove duplicate typedef
Sergei Trofimovich 032c931e 2024-01-13T15:57:03 use `calloc(nmemb, size)`, not `calloc(size, nmemb)` This minor mismatch is detected by new `-Wcalloc-transposed-args` `gcc-14` warning as: In file included from ../src/hb-subset-plan.cc:38: ../src/hb-ot-cff1-table.hh: In member function 'bool OT::cff1::accelerator_t::get_glyph_from_name(const char*, int, hb_codepoint_t*) const': ../src/hb-ot-cff1-table.hh:1419:60: warning: 'void* calloc(size_t, size_t)' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args] 1419 | names = (hb_sorted_vector_t<gname_t> *) hb_calloc (sizeof (hb_sorted_vector_t<gname_t>), 1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Behdad Esfahbod 5b325c0a 2023-12-13T15:27:47 [cff] Fix late sanitize Last summer I changed sanitizer->check_struct() to only check the trailing point of the struct on 64bit machines. This works mostly because offsets are always positive. Not anymore. Recently we introduced negative offsets in CFF, and this was causing sanitize() for such structs pass while the struct's leading edge was out of range. Fix that. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64859
Behdad Esfahbod bf84135e 2023-12-05T11:58:21 [cff] Support negative offsets Fixes https://github.com/harfbuzz/harfbuzz/issues/4508
Behdad Esfahbod 3a9262cc 2023-11-04T12:52:46 [sanitize] More hb_barrier() annotations
Behdad Esfahbod 557653ab 2023-07-09T10:18:04 [cff] Minor; add tableTag
Behdad Esfahbod aed21563 2023-06-26T22:51:50 [subset/cff1] Micro-optimize
Behdad Esfahbod bd3e7877 2023-06-26T18:55:39 [subset/cff1] Reuse a function
Behdad Esfahbod ffd23d3a 2023-06-26T18:54:06 [subset/cff1] Micro-optimize Charset serialization
Behdad Esfahbod 6129702e 2023-06-26T17:34:54 [subset/cff] Simplify some allocation embedding
Behdad Esfahbod 81e2db7c 2023-06-26T14:17:44 [subset/cff1] Speed up plan_subset_charset
Behdad Esfahbod d3f90a8c 2023-06-26T14:02:26 [subset/cff] Use a typedef for glyph_to_sid_map_t
Behdad Esfahbod 289bad82 2023-06-25T17:26:40 [subset/cff1] Minor use a dagger
Behdad Esfahbod 7e97233c 2023-06-25T17:06:02 [subset/cff1] Comment
Behdad Esfahbod 86a550dc 2023-06-25T17:01:40 [subset/cff1] Speed up string writing
Behdad Esfahbod 19eb5e3b 2023-06-23T15:12:13 [subset/cff1] Micro-optimize Charset::serialize
Behdad Esfahbod b80b628a 2023-06-23T13:41:42 [subset/cff1] Speed up plan_subset_charset
Behdad Esfahbod c4b2950d 2023-06-23T11:55:39 [subset/cff1] Use cached subset-accel for seac calculations Before we were creating a new (non-subset) accel each time.
Behdad Esfahbod 5f399139 2023-06-23T11:22:01 [subset/cff] Move lazy cff-accelerator to cff-subset-accelerator Fixes https://github.com/harfbuzz/harfbuzz/issues/4295
Behdad Esfahbod 97d63e8d 2023-06-23T10:43:34 [subset/cff] Move serialize to accelerator
Behdad Esfahbod 26f320dc 2023-06-23T10:24:32 [subset/cff] Remove unused method
Behdad Esfahbod 43ec78f9 2023-06-23T10:22:30 [subset/cff] Cache CFF accelerator in hb_subset_plan_t This shows 7% speedup in: BM_subset/subset_glyphs/SourceHanSans-Regular_subset.otf/retaingids/10
Behdad Esfahbod 7a124a0b 2023-06-22T20:18:20 [cff1] Use constructor for accelerator_templ_t
Behdad Esfahbod ad025ddf 2023-06-22T20:09:36 [subset-cff] Simplify a bit
Behdad Esfahbod 80d6e996 2023-06-07T14:21:40 [subset/cff1] Fix wrong comma location!
Behdad Esfahbod 41369b66 2023-06-07T14:04:42 Revert "[subset/cff1] Optimize writing of consecutive names" This reverts commit 3b25a630403b65eb5608d10c3b8d082a141bd5c8. Not worth it. Shows 0.5% speedup only on SourceSansPro/retaingids/10 Doesn't have code size increase though.
Behdad Esfahbod 3b25a630 2023-06-07T14:04:25 [subset/cff1] Optimize writing of consecutive names
Behdad Esfahbod 79113ec3 2023-06-07T12:14:43 [subset/cff1] Micro-optimize String writing
Behdad Esfahbod b80b6a4f 2023-06-06T18:11:55 [cff] Remove unused types
Behdad Esfahbod a55d0b88 2023-06-06T17:13:09 [subset/cff] Inline type only used once
Behdad Esfahbod 2960d13f 2023-06-06T16:24:28 [subset/cff1] Micro-optimize string writing
Behdad Esfahbod acae5ed2 2023-06-06T16:18:44 [subset/cff1] Speed up sid mapping Don't need a full inc_bimap.
Behdad Esfahbod fd13aa9e 2023-06-06T15:33:51 [subset/cff1] Optimize CFF::CFF1StringIndex::serialize
Behdad Esfahbod 452990ed 2023-06-04T17:46:36 [cff1] Add TODO
Behdad Esfahbod 072c9c06 2023-06-04T16:04:29 Revert "[subset/cff1] Micro-optimize" This reverts commit 93020621f0651920ff92e19f543fbf2351c8311b. This slowed down the common path actually.
Behdad Esfahbod f102d57a 2023-06-04T16:03:34 [subset/cff1] Micro-optimize
Behdad Esfahbod cdfbd7b6 2023-06-04T15:58:14 [subset/cff1] Micro-optimize
Behdad Esfahbod 7b97262b 2023-06-04T15:55:18 [subset/cff1] Micro-optimize
Behdad Esfahbod 59387dbe 2023-06-05T14:47:27 [subset/cff] Speed up sid mapping
Behdad Esfahbod ffc6899b 2023-06-05T14:16:47 [subset/cff1] Use a vector, instead of map, for glyph_to_sid_map Much faster.
Behdad Esfahbod 31014832 2023-06-04T12:58:02 [cff1] More hygiene
Behdad Esfahbod bf0a08c9 2023-06-04T12:54:35 [cff1] Hygiene
Behdad Esfahbod ebc5257e 2023-06-04T11:25:16 [cff1] Add a couple of unlikely's
Khaled Hosny b6516f3b 2023-05-08T15:31:24 [cff] Fix the case of HB_OT_TAG_cff(1|2) macros Should be upper case like other HB_OT_TAG_* macros of upper case tables.
Behdad Esfahbod 7c74fc96 2023-02-19T14:43:07 [CFF] Remove unused member single_val
Behdad Esfahbod 64ed03c9 2023-01-24T18:30:49 [cff1] Return no name for out-of-range glyph IDs Was returning .notdef before.
Matthias Clasen 9be01b6b 2022-12-21T14:04:32 [paint] Pass hb_paint_context_t along Replace the font argument with a hb_paint_context_t that carries the font, the palette index and the foreground color. The hb_font_paint_glyph() api now takes the palette index and the foreground color as extra arguments. Update all callers and regenerate test results.
Matthias Clasen df89b521 2022-12-16T23:46:05 cff1: Implement paint_glyph
Behdad Esfahbod a2681c37 2022-12-01T16:09:03 [cff-subset] Simplify INDEX serialize() more
Garret Rieger 8d5c899b 2022-11-25T20:33:39 [subset] In cff accelerator hold reference to CFF table instead of the whole font.
Behdad Esfahbod 59c45f6d 2022-11-22T12:54:50 Use hb_memcpy instead of memcpy consistently
Behdad Esfahbod 7a39464b 2022-11-21T09:48:54 [cff] Hide members of byte_str_ref_t
Behdad Esfahbod 86d1e22d 2022-08-03T12:43:28 [atomic-ptr] Rename get
Behdad Esfahbod b59e25f2 2022-06-07T09:27:09 [cff] Try fixing Heap-buffer-overflow in CFF::Charset::collect_glyph_to_sid_map Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=47790
Garret Rieger 98aaecd3 2022-06-01T21:01:16 [subset] fix data race touching Crap() in cff subsetting.
Behdad Esfahbod 0919eaa6 2022-05-24T13:07:24 [ot-font] Remove lock around cache Not needed.
Behdad Esfahbod 3b28cff9 2022-05-26T04:42:17 [cff1] Fix null dereference on memory alloc failure
Behdad Esfahbod a4d98b63 2022-05-16T17:02:40 [subset/cff1] Collect glyph-to-sid map to avoid an O(n^2) algorithm Saves 13 for largest benchmark: BM_subset/subset_glyphs/SourceHanSans-Regular_subset.otf/10000 -0.1313 -0.1308 75 65 75 65 BM_subset/subset_codepoints/SourceHanSans-Regular_subset.otf/4096 -0.1009 -0.1004 54 48 54 48 BM_subset/subset_codepoints/SourceHanSans-Regular_subset.otf/10000 -0.1067 -0.1066 70 62 69 62
Behdad Esfahbod b87f48e9 2022-05-16T16:33:31 [cff1] get_sid() move bounds check into each implementation
Behdad Esfahbod 3fbac094 2022-05-16T15:41:11 [cff1] Lazy-load & sort glyph names Improves subset benchmarks by up to 70% for small CFF1 subset of non-CID fonts! BM_subset/subset_glyphs/SourceSansPro-Regular.otf/10 -0.7067 -0.7071 1 0 1 0 BM_subset/subset_glyphs/SourceSansPro-Regular.otf/64 -0.4817 -0.4824 1 0 1 0 BM_subset/subset_glyphs/SourceSansPro-Regular.otf/512 -0.1948 -0.1956 2 2 2 2 BM_subset/subset_glyphs/SourceSansPro-Regular.otf/2000 -0.0767 -0.0761 6 6 6 6
Behdad Esfahbod b46c7faa 2022-05-13T14:02:54 [cff] Check buf_len, not buf Ouch!
Garret Rieger 19a8db85 2022-05-13T18:05:05 [subset] fix potential integer overflow in gname_t::cmp.
Behdad Esfahbod a2f132f1 2022-05-13T13:49:17 [cff] Check glyph-name's length, not arrayZ As the latter can be non-null while still zero-length.
Behdad Esfahbod bff78e65 2022-05-10T16:33:37 [cff] Convert interpretation environment to use constructor
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 370bec93 2022-02-04T18:40:44 [draw] Rename internal draw_session_t to hb_draw_session_t
Behdad Esfahbod c681331c 2022-02-03T14:36:12 [draw] Rename internal draw_helper_t to draw_session_t
Behdad Esfahbod dd7b6e2c 2022-02-02T14:46:10 [draw] Remove EXPERIMENTAL_API tag
Behdad Esfahbod a8b7f188 2022-01-21T07:38:33 [cff] Initialize accelerator members
Behdad Esfahbod ac1bb3e3 2022-01-20T11:47:17 [machinery] Move accelerators to constructor/destructor
Behdad Esfahbod e062376e 2022-01-19T17:09:34 [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.)
Behdad Esfahbod 4eb6e6ea 2022-01-18T12:07:05 [cff] Remove some more fini_deep()
Behdad Esfahbod f0a1892f 2021-07-28T17:36:22 [serialize] Remove unnecessary pointer indirection
Garret Rieger deee24fb 2021-07-14T13:46:36 [subset] Add missing FontName op code in top dict parsing. Fix for #3058
Behdad Esfahbod c539afb0 2021-03-31T13:28:25 [CFF] Use NNOffsetTo<> instead of OffsetTo<> I'm pretty sure that's what is intended.
Garret Rieger d307c24a 2020-07-29T12:23:37 [ENOMEM] check resize() return. Fixes https://oss-fuzz.com/testcase-detail/5641892164009984.
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 22f7c61a 2020-04-17T23:49:51 implement SID to glyph ID mapping with predefined Charset Also fixes oss-fuzz 21769
Ebrahim Byagowi 755a77d6 2020-01-29T22:26:04 Move outline draw API behind HB_EXPERIMENTAL_API directive
ariza 0b290538 2020-03-04T22:31:21 removed unused code
ariza e8f010d7 2020-03-04T16:54:27 removed unused code & data; rename
ariza c05458ec 2020-03-02T16:51:19 update cff & cff2 subsetters
Ebrahim Byagowi 9fe0dc34 2020-02-26T17:40:44 [draw] Pass draw_helper_t itself around instead recreating it Specially helpful if we want to change the design
Ebrahim Byagowi 8c652f72 2020-02-19T16:32:44 Minor, switch to https links where possible
Ebrahim Byagowi 25707e37 2020-02-05T00:27:28 [cff] minor
ckitagawa 0d61926c 2020-02-04T13:36:51 [subset] Keep head when no glyf table
ariza 2792fb8b 2020-02-02T22:00:53 first rewrite of cff/cff2 _subset with _subset2
Ebrahim Byagowi ac81e940 2020-01-28T12:34:47 Rename hb_outline_decompose to hb_font_draw_glyph and hb_outline_decompose_funcs_t to hb_draw_funcs_t
Ebrahim Byagowi 981125aa 2020-01-25T21:31:36 Rename hb_ot_glyph_* to hb_outline_*
Ebrahim Byagowi ec1fba13 2020-01-13T19:31:18 [ot-glyph] make hb_ot_glyph_decompose_funcs_t struct opaque
Ebrahim Byagowi 084a8182 2020-01-10T22:14:46 [ot-glyphs] Move CFF glyph decompose logic to their tables Thus making path decompose zero alloc on CFF/CFF2