src/hb-buffer.hh


Log

Author Commit Date CI Message
Behdad Esfahbod ed43bc51 2022-11-20T13:10:19 [buffer] Move delete_glyphs_inplace() here
Behdad Esfahbod dff1b809 2022-11-16T16:19:05 [buffer] Add .digest() and use
Behdad Esfahbod f43dadb8 2022-07-30T10:23:03 Rename kashida -> tatweel
Behdad Esfahbod d277addb 2022-07-30T10:10:21 [buffer] Add HB_BUFFER_FLAG_PRODUCE_SAFE_TO_INSERT_KASHIDA
Behdad Esfahbod 915e12cc 2022-07-29T13:55:39 Prototype glyph flag safe-to-kashida Fixes https://github.com/harfbuzz/harfbuzz/issues/3721
Behdad Esfahbod 0722b627 2022-07-24T17:35:44 [buffer] Return delta from sync_so_far
Behdad Esfahbod c55c0197 2022-03-21T19:11:17 [buffer] Add assertions of buffer sync status to message_impl
Behdad Esfahbod da9edce8 2022-03-21T18:51:01 [buffer] Add sync_so_far() This removes separate out-buffer, at the cost of possibly changing idx.
Behdad Esfahbod 31e985d7 2022-06-27T16:32:02 [buffer] Likely that not messaging
Behdad Esfahbod 148283d0 2022-06-10T07:48:39 [syllabic] Use a buffer scratch-flag for has-broken-syllable
Behdad Esfahbod 104dc85a 2022-06-04T06:56:35 [buffer] Add try_allocate for buffer variables
Behdad Esfahbod f18eb000 2022-06-05T04:17:05 [buffer] Mark a variable as unused Weird. Somehow our HB_TINY bot started erring as this var being unused in non-debug builds. Not sure why now... In file included from src/hb-ot-map.hh:32:0, from src/hb-ot-shape.hh:32, from src/hb-aat-layout.hh:32, from src/hb-aat-layout.cc:30, from src/harfbuzz.cc:1: src/hb-buffer.hh: In member function ‘void hb_buffer_t::assert_var(unsigned int, unsigned int)’: src/hb-buffer.hh:192:18: error: unused variable ‘bits’ [-Werror=unused-variable] unsigned int bits = (1u<<end) - (1u<<start); ^~~~ cc1plus: some warnings being treated as errors Error: Process completed with exit code 1.
Behdad Esfahbod 6fbb5521 2022-06-03T02:50:25 s/FLAG_COMPLEX/FLAG_SHAPER/g
Behdad Esfahbod f3f9fc15 2022-05-31T06:05:57 [buffer] Mark glyph_flags_t as flags
Behdad Esfahbod 9a2a8570 2022-05-31T04:25:20 [ot-shape] Don't verify buffer if shaping failed Fixes all of fuzzing verify failures, which were result of buffer failure on super-long results, which fails unsafe-to-break because shorter strings don't fail shaping.
Behdad Esfahbod 56f11ec9 2022-02-18T14:08:43 [buffer] Add HB_BUFFER_FLAG_PRODUCE_UNSAFE_TO_CONCAT Fixes https://github.com/harfbuzz/harfbuzz/issues/3454
Behdad Esfahbod b263371b 2022-02-12T15:06:47 Merge pull request #3398 from harfbuzz/buffer-verify Add HB_BUFFER_FLAG_VERIFY
Behdad Esfahbod 8670ffbf 2022-02-03T11:19:23 [buffer] Comment
Behdad Esfahbod 61823838 2022-01-28T13:45:25 [buffer] Add HB_BUFFER_FLAG_VERIFY Move buffer verification code inside the library, from util/. Part of https://github.com/harfbuzz/harfbuzz/issues/3010
Behdad Esfahbod 33246064 2022-01-22T15:46:13 [buffer] Oops
Behdad Esfahbod 6e345f70 2022-01-22T11:40:37 Cosmetic
Behdad Esfahbod 14d43d12 2022-01-22T10:46:18 [unsafe-to-concat] Adjust end conditions
Behdad Esfahbod ea1b32c8 2022-01-21T18:58:33 [unsafe-to-concat] Adjust "interior"ness of "from_out_buffer"
Behdad Esfahbod c0058892 2022-01-20T15:51:04 [unsafe-to-concat] Mark entire buffer unsafe-to-concat if kerx format2
Behdad Esfahbod d98a0fc8 2021-12-04T20:43:27 [buffer] Consolidate glyph-flags implementation
Behdad Esfahbod f91ce56e 2021-12-04T20:07:05 [buffer] Add default cluster value in find_min_cluster
Behdad Esfahbod 56d08195 2021-12-04T19:59:55 [buffer] Rename _unsafe_to_break_set_mask to _infos_set_glyph_flags
Behdad Esfahbod 3122c2cd 2021-12-04T19:50:33 [buffer] Add HB_GLYPH_FLAG_UNSAFE_TO_CONCAT Fixes https://github.com/harfbuzz/harfbuzz/issues/1463
Behdad Esfahbod bea5369c 2022-01-04T10:52:05 [buffer] Rename swap_buffers() to sync()
Behdad Esfahbod d1e7df5c 2022-01-04T07:32:04 [buffer] Add enter()/leave() pair around shape()
Behdad Esfahbod 43be5ba4 2022-01-04T07:26:53 [buffer] Group shape-related members together
Behdad Esfahbod 52f5711e 2022-01-03T11:57:42 [buffer] Add hb_buffer_create_similar() Fixes https://github.com/harfbuzz/harfbuzz/issues/1555
Behdad Esfahbod f643b81f 2022-01-03T11:45:31 [buffer] Clean up internal state bookkeeping hb_buffer_reset() was NOT resetting cluster_level. Ouch! Fix that. Part of https://github.com/harfbuzz/harfbuzz/issues/1555
Behdad Esfahbod 5b995526 2021-12-10T14:59:56 [buffer] Fix reverse_group() to reverse() at the end
Behdad Esfahbod 21c4fc10 2021-12-10T13:02:43 [buffer] Add optional merge_clusters arg to reverse_groups()
Behdad Esfahbod eb96e69d 2021-12-10T12:55:29 [buffer] Add foreach_group()
Behdad Esfahbod 1b78e04c 2021-12-10T12:45:43 [buffer] Add ::reverse_groups()
Behdad Esfahbod 4cd96e73 2021-12-10T12:33:21 [buffer] Inline revers_range() / reverse()
Behdad Esfahbod 70f8c57e 2021-12-04T19:49:23 [buffer] Rename find_min_cluster
Behdad Esfahbod 94d43c00 2021-12-04T16:56:39 [buffer] Merge and rename clear_glyph_flags()
Behdad Esfahbod da500568 2021-10-26T08:02:29 [API] Add hb_buffer_[sg]et_not_found_glyph() and --not-found-glyph Instead of using gid=0 when a character is not found in the font, client can now set a custom value. This is useful for shaper-driven font fallback and to differentiate that from .notdef glyph. Fixes https://github.com/harfbuzz/harfbuzz/issues/1360
Behdad Esfahbod 95b04f74 2021-07-12T17:35:45 [buffer] Remove unnecessary have_separate_output()
Behdad Esfahbod 3e266e5f 2021-07-12T17:30:26 [buffer] Update comments
Behdad Esfahbod 3807061d 2021-07-12T17:02:03 [ot-layout] Don't remove_output() before reverse substitution No need anymore, because of new swap_buffers() semantics. Just assert instead.
Behdad Esfahbod 93e6a9bc 2021-06-15T15:38:49 Revert "Remove unneeded buffer clear_output / remove_output calls" This reverts commit 06175b71433bc42edc07d342e6354035e37fb5fd. One of the sanitizers is failing. Pushing again as PR to debug. I have suspicions.
Behdad Esfahbod 06175b71 2021-06-15T14:33:27 Remove unneeded buffer clear_output / remove_output calls Made sure clear_output is always paired with swap_buffers. Trying to see if we can move towards RAII-like buffer iterators instead of the buffer keeping an iterator internally.
Behdad Esfahbod c61ce962 2021-06-10T17:33:29 [buffer] In hb_buffer_get_positions(), return NULL if inside message callback As discussed in https://github.com/harfbuzz/harfbuzz/issues/2468#issuecomment-645666066 Part of fixing https://github.com/harfbuzz/harfbuzz/issues/2468
Behdad Esfahbod 9e397ff2 2021-03-15T16:50:54 [buffer] Fix order of HB_INTERNAL HB_DISCARD Sucks that has to be specified in this order. But that is what it is for now. Was only exhibiting problem on C++>=17 since that's when the [[nodiscard]] was introduced.
Behdad Esfahbod 8450f43a 2021-03-15T15:18:06 [buffer] HB_NODISCARD next_glyph()
Behdad Esfahbod f4bc7673 2021-03-15T14:54:45 [buffer] Implement copy_glyph() in terms of output_info()
Behdad Esfahbod f73982a6 2021-03-15T14:52:19 [buffer] Implement replace_glyph() in terms of replace_glyphs(1,1) I get exact same binary size with this, suggesting that compiler is optimizing these as needed.
Behdad Esfahbod 862f9134 2021-03-15T14:48:50 [buffer] Implement output_glyph() in terms of replace_glyphs(0,1) To my surprise, saves ~20kb in my build (non-size-optimized) build. The output_glyph() method is never used in the fast paths, so doesn't matter if is not fully optimized for the special case it is.
Behdad Esfahbod 34a1204f 2021-03-15T14:39:06 [buffer] HB_NODISCARD output_glyph() Also, generalize and use replace_glyphs() in morx where output_glyph() was used in a loop.
Behdad Esfahbod e6be9eb4 2021-03-15T14:12:10 [buffer] HB_NODISCARD output_info()
Behdad Esfahbod 2a0dbb3e 2021-03-15T14:10:39 [buffer] HB_NODISCARD copy_glyph()
Behdad Esfahbod b05e5d9a 2021-03-15T14:08:08 [buffer] HB_NODISCARD next_glyphs()
Behdad Esfahbod 4ae8aab8 2021-03-15T14:01:52 [buffer] HB_NODISCARD has_separate_output()
Behdad Esfahbod 8d3701f5 2021-03-15T14:01:32 [buffer] HB_NODISCARD in_error()
Behdad Esfahbod 41e05479 2021-03-15T14:00:00 [buffer] HB_NODISCARD shift_forward()
Behdad Esfahbod 83b3784d 2021-03-15T13:59:14 [buffer] HB_NODISCARD make_room_for()
Behdad Esfahbod c355508a 2021-03-15T13:58:30 [buffer] HB_NODISCARD ensure_glyphs() / ensure_unicode()
Behdad Esfahbod bc22305b 2021-03-15T13:57:18 [buffer] HB_NODISCARD ensure_inplace()
Behdad Esfahbod cac6c86d 2021-03-15T13:46:54 [buffer] HB_NODISCARD move_to()
Behdad Esfahbod 05d2d37f 2021-03-15T13:43:29 [buffer] HB_NODISCARD ensure()
Behdad Esfahbod d8028a07 2021-03-15T13:34:36 [buffer] HB_NODISCARD enlarge()
Behdad Esfahbod 3f1998a0 2021-03-15T13:33:44 [buffer] HB_NODISCARD replace_glyph()
Behdad Esfahbod 607979d1 2021-03-15T13:23:48 [buffer] HB_NODISCARD replace_glyphs()
Behdad Esfahbod 906c9928 2021-03-15T13:13:45 [buffer] Return success status from buffer ops that can fail Previous error-handling philosophy was that user doesn't need to immediately know whether operation failed. But as can be seen after we added malloc-failing fuzzing, there's just so many places in the code that a failure of these operations needs to be mitigated before further operations. So I'm moving towards returning success here, and possibly making it nodiscard.
Behdad Esfahbod 77e704d1 2020-10-15T02:02:04 [buffer] Add assert_unicode()/assert_glyphs() and use internally
Behdad Esfahbod 5ef06139 2020-10-15T01:54:28 [buffer] Add ensure_glyphs()/ensure_unicode() Use in deserialize. To be used more.
Behdad Esfahbod 1c05f678 2020-10-11T12:28:25 [buffer] Increase work limits Our previous limits of 64 per input character was already hit by David Corbett's under-development Duployan font. Increase work limits by factor of 16, and number of glyphs by factor of 2. Fixes https://github.com/harfbuzz/harfbuzz/issues/2707
Ebrahim Byagowi d0e2addd 2020-07-18T22:14:52 minor
Ebrahim Byagowi 2dda6dd7 2020-04-20T14:12:45 minor, tweak spacing turn 8 spaces to tab, add space before Null/Crap
Evgeniy Reizner cd7b46ca 2020-01-26T20:46:19 Use correct return type in _unsafe_to_break_find_min_cluster.
Behdad Esfahbod 029775bc 2019-10-09T11:00:09 [buffer] Minor; improve HB_NO_BUFFER_MESSAGE
Ebrahim Byagowi 0558413f 2019-10-01T13:49:55 Minor, tweak spaces
Behdad Esfahbod 7f3b409e 2019-06-20T14:24:43 Fix build with -O0 message_impl was not defined. That causes trouble if compiler didn't optimize the unreachable call out...
Behdad Esfahbod eb9798ef 2019-06-18T13:29:55 [config] Dont' compile buffer message API if HB_NO_BUFFER_MESSAGE Part of https://github.com/harfbuzz/harfbuzz/issues/1652
Behdad Esfahbod c7439d4e 2019-06-05T12:13:49 Slightly massage buffer-messaging commit Saves a few bytes.
Behdad Esfahbod 41248cce 2019-05-07T20:54:31 Remove MIN/MAX in favor of hb_min/hb_max
Behdad Esfahbod 5d4b0377 2019-01-22T12:11:24 Convert unsigned enum class consts to static constexpr Part of https://github.com/harfbuzz/harfbuzz/issues/1553
Behdad Esfahbod 271cb7c1 2019-01-22T12:05:35 Make some enum constants unsigned
Behdad Esfahbod 9aebfb41 2018-12-18T13:22:17 [serialize] Streamline error propagation
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)
Behdad Esfahbod 35d410f2 2018-10-29T14:45:44 Remove ASSERT_POD Newer compilers / language allows structs with constructor in union. So, this was not actually testing anything. Indeed, the recent change in DISALLOW_COPY *is* making some of our types non-POD. That broke some bots. Just remove this since it wasn't doing much, and I'd rather have DISALLOW_COPY.
Behdad Esfahbod 60c13976 2018-10-14T19:36:46 [buffer] Fix output_glyph at end of buffer Part of https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10955
Behdad Esfahbod e883f527 2018-10-09T14:50:57 Call get_nominal_glyphs() for runs of simple clusters at a time Even without FT or OT font funcs implementing get_nominal_glyphs(), there's measurable speedup.
Behdad Esfahbod 71b65eb2 2018-10-07T18:41:52 Add API for setting invisible-codepoint Fixes https://github.com/harfbuzz/harfbuzz/issues/1216 New API: hb_buffer_set_invisible_codepoint() hb_buffer_get_invisible_codepoint() hb-shape / hb-view --invisible-codepoint
Behdad Esfahbod 2a6f1521 2018-10-03T20:09:14 [buffer] Inline some more
Behdad Esfahbod c36f3f5b 2018-10-02T14:34:29 [arabic] Use manual-zwj instead of flipping joiners
Behdad Esfahbod bd07d287 2018-09-30T03:54:40 Use buffer scratch_flags to remember if we had any joiners
Behdad Esfahbod 606bf574 2018-09-16T19:33:48 Revert forcing use of single-parameter static_assert() Some clang versions define static_assert as a macro apparently, so we cannot redefine it... This reverts commit 94bfea0ce6a7b4d5641c198d50751748a353df11. This reverts commit 4e62627831e7457ed60ff87712570065b14b200a.
Behdad Esfahbod 4e626278 2018-09-16T18:09:36 Enforce single-param static_assert() only So we don't accidentally break it again.
Behdad Esfahbod fda994e1 2018-09-07T15:02:57 Use enum instead of "static const" in class scope Technically, static const needs an out-of-class definition. Eg: CXXLD libharfbuzz-subset.la Undefined symbols for architecture x86_64: "OT::FeatureVariationRecord::min_size", referenced from: bool OT::GSUBGPOS::subset<OT::PosLookup>(hb_subset_context_t*) constin libharfbuzz_subset_la-hb-subset.o bool OT::GSUBGPOS::subset<OT::SubstLookup>(hb_subset_context_t*) constin libharfbuzz_subset_la-hb-subset.o "OT::Record<OT::LangSys>::min_size", referenced from: OT::Script::subset(hb_subset_context_t*) constin libharfbuzz_subset_la-hb-subset.o "OT::IntType<unsigned short, 2u>::min_size", referenced from: OT::Script::subset(hb_subset_context_t*) constin libharfbuzz_subset_la-hb-subset.o OT::RecordListOf<OT::Feature>::subset(hb_subset_context_t*) const in libharfbuzz_subset_la-hb-subset.o ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status make[4]: *** [libharfbuzz-subset.la] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 Exited with code 2
Behdad Esfahbod c77ae408 2018-08-25T22:36:36 Rename hb-*private.hh to hb-*.hh Sorry for the noise, downstream custom builders. Please adjust.