src/hb-buffer.hh


Log

Author Commit Date CI Message
Behdad Esfahbod 17c875c3 2025-03-28T16:26:27 [buffer] Minor add a function
Behdad Esfahbod 6d95c128 2025-02-12T10:36:49 [buffer] Remove unused includes
Behdad Esfahbod b13017e6 2025-02-09T08:00:18 Use HB_ALWAYS_INLINE instead of bare __attribute__ The former works on MSVC too.
Behdad Esfahbod 6091abcc 2025-02-06T02:40:24 [buffer] Avoid a copy in collect_codepoints()
Behdad Esfahbod e5e3bc40 2025-02-06T02:36:26 [buffer] Merge two functions into a template
Behdad Esfahbod 403f12f7 2025-02-06T02:33:41 [buffer] A few always-inline's
Behdad Esfahbod d40c079f 2025-02-05T12:30:56 [morx] Use hb_bit_set_t instead of hb_set_t directly
Behdad Esfahbod 474bef1c 2025-02-04T19:17:13 [aat] Use exact set for buffer intersection versus subchains
Behdad Esfahbod b94a39d7 2024-09-22T08:23:34 Follow up to variation-selector-not-found glyph Addresses https://github.com/harfbuzz/harfbuzz/pull/4529#discussion_r1769638033 I'm not sure if this is an improvement. By leaving the var-selector as default-ignorable, ligatures can form around it, and the resulting cluster won't make it clear *which* base+var-selector could not be resolved... That doesn't quite help font fallback the way we want. Putting up for review.
Behdad Esfahbod a003890e 2024-09-21T11:30:56 [buffer] Add hb_buffer_[sg]et_not_found_variation_selector_glyph() Unused.
Behdad Esfahbod f1ac867d 2024-03-14T13:30:21 [buffer] Add API for random state Fixes https://github.com/harfbuzz/harfbuzz/issues/4620 New API: +hb_buffer_set_random_state() +hb_buffer_get_random_state()
Behdad Esfahbod b2a73166 2023-07-30T11:23:19 [buffer] Fix unsafe_to_concat() Ouch!
Behdad Esfahbod 4e641103 2023-07-16T07:40:20 [buffer] Inline a method
Behdad Esfahbod ccfd7ef0 2023-05-17T16:00:33 Merge pull request #4131 from harfbuzz/wasm [wasm] WebAssembly shaper
Behdad Esfahbod 7b9832de 2023-04-29T12:56:07 [buffer] Whitespace
Behdad Esfahbod c1dc1121 2023-02-23T15:47:56 [wasm-api] Bind buffer_set_contents
Behdad Esfahbod 1930760b 2023-02-06T15:54:09 [buffer] Fix up previous commit https://github.com/harfbuzz/harfbuzz/commit/85be877925ddbf34f74a1229f3ca1716bb6170dc#commitcomment-99547060
Behdad Esfahbod 30b84fab 2023-02-06T15:27:13 [buffer] Optimize _infos_set_glyph_flags to avoid O(n^2) behavior https://github.com/harfbuzz/harfbuzz/commit/85be877925ddbf34f74a1229f3ca1716bb6170dc#commitcomment-99547060
Behdad Esfahbod 0b97ac39 2023-02-06T15:17:09 [buffer] Optimize _infos_find_min_cluster for monotone clusters
Behdad Esfahbod ae208963 2022-12-26T12:30:39 Add hb-limits.hh
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