src/hb-ot-shape.cc


Log

Author Commit Date CI Message
Behdad Esfahbod cc7ebb0f 2022-06-04T05:42:58 Remove remaining mention to complex shapers in the code https://github.com/harfbuzz/harfbuzz/pull/3628#issuecomment-1146248037
Behdad Esfahbod 5bfb0b72 2022-06-03T02:56:41 Rename s/shape-complex/shaper/g
Behdad Esfahbod 6d9e94d2 2022-06-03T02:48:34 s/hb_ot_shape_complex_categorize/hb_ot_shaper_categorize/g
Behdad Esfahbod 44a7b3b7 2022-06-03T02:42:34 s/ot_complex_shaper/ot_shaper/g
Behdad Esfahbod e246723f 2022-06-01T04:54:18 [shape] Fail shaping internally if buffer ops exceeded
Behdad Esfahbod 8575a8f5 2022-04-21T11:14:09 Add _hb_codepoint_is_regional_indicator()
Behdad Esfahbod c1ee7d28 2022-04-20T13:38:05 Typo Co-authored-by: Khaled Hosny <khaled@aliftype.com>
Behdad Esfahbod 4d48fae4 2022-04-20T11:35:19 Enforce Regional_Indicators native direction to LTR And undo the morx direction reversal change introduced in https://github.com/harfbuzz/harfbuzz/pull/3315 23159084b43c1ce429d9e98035bf845919fd8a89 This fixes original bug https://github.com/harfbuzz/harfbuzz/issues/3314 And the reversion in morx code fixes regressions: https://github.com/harfbuzz/harfbuzz/issues/3528 https://github.com/harfbuzz/harfbuzz/issues/3535 Supersedes: https://github.com/harfbuzz/harfbuzz/pull/3529
Behdad Esfahbod 94f5c630 2022-03-28T11:25:44 [aat] Remove morx deleted-glyphs before GPOS processing Fixes new Apple Color Emoji glyphs sequences rendering. Fixes https://github.com/harfbuzz/harfbuzz/issues/3512
Behdad Esfahbod 3122c2cd 2021-12-04T19:50:33 [buffer] Add HB_GLYPH_FLAG_UNSAFE_TO_CONCAT Fixes https://github.com/harfbuzz/harfbuzz/issues/1463
luz paz e2e30506 2022-01-16T07:00:53 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`
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 23159084 2021-12-10T15:00:16 [morx] Reverse graphemese, not whole buffer Fixes https://github.com/harfbuzz/harfbuzz/issues/3314 Supersedes https://github.com/harfbuzz/harfbuzz/pull/3315
Behdad Esfahbod 53eebc7c 2021-12-08T08:32:41 [CONFIG] Add HB_NO_VERTICAL
Behdad Esfahbod d58f1685 2021-10-04T08:40:24 [ot-shape] Tweak table order some more; apply GPOS with morx During 5bc05ba155 accidentally GPOS was disabled when morx was enabled. Fix that. Fixes https://github.com/harfbuzz/harfbuzz/issues/2757#issuecomment-933531978
Behdad Esfahbod 5a1a6f1f 2021-09-14T07:14:56 [ot-shape] Enabled two more features: 'Harf' and 'Buzz' Considered 'required', as opposed to existing 'HARF' and 'BUZZ', consider them discretionary. See discussion in https://github.com/harfbuzz/harfbuzz/issues/3200
Behdad Esfahbod f0de40dd 2021-08-23T23:52:17 Whitespace
Behdad Esfahbod 33c82c7d 2021-08-22T22:31:39 [ot-shape] Fix unused-var error when building without AAT Fixes https://github.com/harfbuzz/harfbuzzjs/issues/45
Behdad Esfahbod 368e9578 2021-08-05T10:16:13 [ot-shape] Add comment re `vert` feature
Behdad Esfahbod 79e8b306 2021-07-16T15:06:10 [ot-shape] Fix application of kern table if GPOS kern is missing Was broken sometime after we implemented kerx and tweaking it. Fixes https://github.com/harfbuzz/harfbuzz/issues/3043
Behdad Esfahbod a623446a 2021-07-12T16:55:54 [shape] Remove stray clear_output() call in hb_shape()
Behdad Esfahbod 1cb0ca1f 2021-07-12T16:52:31 Whitespace
Behdad Esfahbod 09696148 2021-06-26T08:52:53 [ot-shape] Rewrite loop without foreach_grapheme() We were not using the graphemes, and that's costlier than just for().
Khaled Hosny c3be28ea 2021-06-23T17:39:23 [ot-shape] Numeric runs native direction is LTR See inline comments. Slightly modified version of the code from Jonathan Kew on the linked issue. Fixes https://github.com/harfbuzz/harfbuzz/issues/501
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 2b0ced28 2021-06-09T19:06:31 Cluster Regional_Indicator pairs (aka emoji flags) Fixes https://github.com/harfbuzz/harfbuzz/issues/2265
Behdad Esfahbod 5bc05ba1 2021-06-13T05:28:20 Prefer GPOS over kerx, if GSUB was applied Fixes https://github.com/harfbuzz/harfbuzz/issues/3008
Jonathan Kew bbc5fc37 2021-05-13T11:39:09 [aat] If shaping via morx, don't adjust mark positioning when zeroing widths.
Behdad Esfahbod e6be9eb4 2021-03-15T14:12:10 [buffer] HB_NODISCARD output_info()
Behdad Esfahbod 9fcba109 2020-06-28T20:30:39 [buffer] Make swap_buffers() copy rest
Simon Cozens fd8f4ffc 2020-09-18T16:37:22 Trace reorder, not normalize
Simon Cozens 2e0193d7 2020-09-18T16:28:29 Add more cast spaces
Simon Cozens 8e1bedc5 2020-09-18T16:25:43 Keep phase names
Simon Cozens f19018da 2020-09-17T15:08:32 Smaller issues from review
Simon Cozens 8b3b835a 2020-09-17T14:27:31 Trace normalization and preprocessing stages
Nathan Willis eb10ef46 2019-04-22T19:22:24 [Docs] Add GTK-Doc comments for hb-ot-font and hb-ot-shape.
Ebrahim Byagowi d0e2addd 2020-07-18T22:14:52 minor
Sebastian Rasmussen a373e161 2020-06-28T11:09:45 [ot-shape] Free shape plan maps upon error creating data (#2497)
Ebrahim Byagowi f9070cfe 2020-01-24T22:19:03 Run morx if run is horizontal or GSUB doesn't exist
Dominik Röttsches 298c46af 2020-01-24T12:11:07 Only prefer AAT morx for horizontal layout Fixes #2124.
Dominik Röttsches 66dfd605 2020-01-13T15:50:27 Fix duplicate check in hb_ot_rotate chars Fixes #2099. Fix indentation in mirroring section as well.
Evgeniy Reizner b79ceac3 2019-12-15T16:50:01 Prefer UINT_MAX instead of uint overflow. Also, prefer HB_FEATURE_GLOBAL_START and HB_FEATURE_GLOBAL_END.
Behdad Esfahbod f47cbade 2019-12-09T18:10:34 [aat] Adjust fallback positioning logic Fixes https://github.com/harfbuzz/harfbuzz/issues/1528 Wish could add a test... $ ./hb-view --font-file Thonburi.ttc --unicodes U+0E17,U+0E35,U+0E48,U+0E4A --shaper ot ▃ ▂▃▃▄▃▂▁▊ ▃ ▃ ▎ ▗ ▅▆▆▅ ▌ ▆▆▅▆▙ ▌▗ ▗ ▙ ▂ ▎▗ ▟ ▅▆▆▆▇▇▇▇▇▇▇▆▆▅▄ ▇▅▅▅ ▙▆▇ ▁▁▂▁ ▁▁ ▖ ▖ ▂▂ ▉ ▁ ▆▆ ▌ ▆ ▙▄ ▁▁ ▙ ▉ ▃▖ ▟ ▊ ▉ ▅▟ ▗▄ ▊ ▉ ▗ ▏ ▇▆ ▊ ▟ ▉ ▆ ▖ ▊ ▉ ▌ ▂ ▊ ▏ ▉ ▌ ▗ ▄▟ ▊ ▆
Behdad Esfahbod 2dc20e63 2019-12-05T15:28:42 Implement fallback vertical shaping from Firefox Fixes https://github.com/harfbuzz/harfbuzz/issues/355
Behdad Esfahbod 0414341a 2019-12-05T11:26:39 Prefer AAT shaping over OT if both available Fixes https://github.com/harfbuzz/harfbuzz/issues/1529
Behdad Esfahbod 1a1d64bc 2019-10-31T12:50:47 If applying morx, apply kern table even if GPOS is present and has kern Since we won't be applying GPOS if morx... To be adjusted as I receive more information from Ned. But for now fixes this: $ ./hb-shape GillSans.ttc Ty [T=0+1109|y=1@-128,0+769] Fixes https://github.com/harfbuzz/harfbuzz/issues/1982 for now.
Ebrahim Byagowi a0b4ac4d 2019-08-24T17:57:14 Turn 8 spaces to tab across the project According to the current code style of the project
Khaled Hosny 40aef1b4 2019-08-16T01:00:30 [ot-shape] Keep horizontal_features array sorted
Khaled Hosny da5118da 2019-08-16T00:48:26 [ot-shape] Enable abvm/blwm features by default Core Text seems to apply them to Latin text, but Uniscribe doesn’t. See https://github.com/harfbuzz/harfbuzz/pull/1908#issuecomment-521819343
Khaled Hosny 2164bd6f 2019-08-16T00:28:41 [ot-shape] Enable dist feature by default (#1908) Fixes https://github.com/harfbuzz/harfbuzz/issues/1907
Behdad Esfahbod cd65305b 2019-06-26T14:57:48 [config] Don't disable emoji sequences in HB_TINY It makes sense to disable this code these if editing is not needed. However, this is also necessary to correctly display emoji sequences in right-to-left direction. For that reason, don't auto-disable it.
Behdad Esfahbod 5130c90a 2019-06-26T14:29:39 [config] Add HB_NO_EMOJI Part of https://github.com/harfbuzz/harfbuzz/issues/1652
Behdad Esfahbod 2804790b 2019-06-26T13:38:14 [config] Add dependency
Behdad Esfahbod 12092a46 2019-06-26T13:31:01 [config] Rename HB_NO_SHAPE_AAT to HB_NO_AAT_SHAPE
Behdad Esfahbod 7aad5365 2019-06-26T13:21:03 [config] Add HB_NO_OT_SHAPE / HB_NO_OT Part of https://github.com/harfbuzz/harfbuzz/issues/1652
Behdad Esfahbod f4de0c77 2019-06-19T17:08:26 [config] Disable AAT map Part of https://github.com/harfbuzz/harfbuzz/issues/1652
Behdad Esfahbod d8bf6723 2019-06-19T17:04:16 [config] Disable more legacy kerning Part of https://github.com/harfbuzz/harfbuzz/issues/1652
Behdad Esfahbod 43d7048d 2019-06-19T17:02:32 [config] More trak disabling Part of https://github.com/harfbuzz/harfbuzz/issues/1652
Behdad Esfahbod d84932ba 2019-06-19T16:57:48 [config] add HB_NO_OT_SHAPE_FRACTIONS, enabled in HB_LEAN Part of https://github.com/harfbuzz/harfbuzz/issues/1652
Behdad Esfahbod eaf4a736 2019-06-19T16:51:13 [config] Minor trak disable Part of https://github.com/harfbuzz/harfbuzz/issues/1652
Behdad Esfahbod 588697af 2019-06-19T16:24:51 [config] Add HB_NO_OT_KERN, enabled by HB_MINI / HB_NO_LEGACY Part of https://github.com/harfbuzz/harfbuzz/issues/1652
Behdad Esfahbod 231d0257 2019-06-18T14:25:52 [config] Don't compile AAT API if HB_NO_AAT Part of https://github.com/harfbuzz/harfbuzz/issues/1652
Ebrahim Byagowi 9e7c9c3a 2019-05-14T15:58:51 Fix -Wunused-function on HB_NO_SHAPE_AAT We should add a bot for it Part of #1652
Behdad Esfahbod 809c5870 2019-05-13T14:45:51 [config] Better compile away morx/kerx/trak Part of https://github.com/harfbuzz/harfbuzz/issues/1652
Behdad Esfahbod 799c6a50 2019-05-10T23:55:22 [config] Add some
Behdad Esfahbod 2c93f0de 2019-05-10T23:31:05 Add HB_NO_AAT Part of https://github.com/harfbuzz/harfbuzz/issues/1652
Behdad Esfahbod 41248cce 2019-05-07T20:54:31 Remove MIN/MAX in favor of hb_min/hb_max
Eric Muller a8635691 2019-02-09T02:55:27 Add a flag to hb_buffer_t to prevent the insertion of dotted circles on incorrect character sequences. Current behavior unchanged if this flag is not set (and it isn't by default).
Eric Muller 30d7c40f 2019-02-09T02:55:27 Add a flag to hb_buffer_t to prevent the insertion of dotted circles on incorrect character sequences. Current behavior unchanged if this flag is not set (and it isn't by default).
Behdad Esfahbod fd0889f9 2019-01-24T16:12:52 Comment
Behdad Esfahbod 9f314177 2019-01-24T16:08:33 Form cluster for Emoji sub-region tag sequences Fixes https://github.com/harfbuzz/harfbuzz/issues/1556
Behdad Esfahbod 3ecda710 2019-01-24T12:08:23 Adjust mark offsets when zeroing from fallback mark positioning code Adjust tests. Fixes https://github.com/harfbuzz/harfbuzz/issues/1532
Ebrahim Byagowi e4120085 2018-12-17T21:31:01 Remove redundant void from C++ sources (#1486)
Behdad Esfahbod 000d4b12 2018-11-29T12:32:47 Make shaper's override_features() override user features as well The override_features is used to override features that are normally discretionary features, but in a specific shaper are for various reasons desired to be bolted on or off, because they've been used for inherent shaping. As such, it makes sense that they also override user features. Ie. if user turned 'liga' on, we don't want Khmer shaping to become broken... Or turn 'clig' off... Fixes https://github.com/harfbuzz/harfbuzz/issues/1310
Behdad Esfahbod 74896226 2018-11-23T11:10:17 [aat] Disable mark advance zeroing if kern table has state-machines Geeza Pro for example, relies on that for fancy mark positioning. Fixes https://github.com/harfbuzz/harfbuzz/issues/1405
Behdad Esfahbod 199a0f7b 2018-11-22T17:31:07 [ot-shape] Simplify logic
Behdad Esfahbod 014e4980 2018-11-22T16:21:49 Move
Behdad Esfahbod 62890dee 2018-11-22T16:20:29 [aat] Zero mark advances if decided so even if there's cross-kerning Cross-kerning can only take care of positioning vertically. It doesn't adjust mark advance...
Behdad Esfahbod a201fa74 2018-11-22T15:52:29 [aat] Tweak fallback positioning logic when applying morx Such that for Indic-like scripts (eg. Khmer), we don't do any fallback mark advance-zeroing / positioning, but we do for Latin, etc. Reuses preferences of our script-specific OpenType shapers for those. Fixes regression: https://github.com/harfbuzz/harfbuzz/issues/1393 Which means, fixes again: https://github.com/harfbuzz/harfbuzz/issues/1264 While not regressing: https://github.com/harfbuzz/harfbuzz/issues/1357
Behdad Esfahbod 7a97f707 2018-11-16T14:46:40 Don't apply GPOS if applying morx That's what Apple does, and it wouldn't degrade our OpenType performance. Part of https://github.com/harfbuzz/harfbuzz/issues/1348
Behdad Esfahbod eafd5156 2018-11-16T14:45:56 Prefer morx table if GSUB is empty (no scripts) Fixes https://github.com/harfbuzz/harfbuzz/issues/1348
Behdad Esfahbod ce5da0f3 2018-11-16T02:29:13 [shaper] Rewrite shaper data code to be more template-driven than macro-driven
Behdad Esfahbod c221dc0b 2018-11-14T14:49:34 [ot-shape] Move code around
Behdad Esfahbod 3c3eb5ea 2018-11-13T21:10:10 [aat] Disable fallback mark advance zeroing and positioning if morx applied Fixes https://github.com/harfbuzz/harfbuzz/issues/1357
Behdad Esfahbod cc842875 2018-11-12T18:48:10 [shape-plan] Cache shape plans with variations based on variation indices
Behdad Esfahbod 10823385 2018-11-12T18:05:02 [shape-plan] Only use shape-plan key to initialize hb_ot_shape_plan_t Such that we don't accidentally use info not in the cache key.
Behdad Esfahbod 3e284e02 2018-11-11T22:51:34 [shape-plan] Minor
Behdad Esfahbod f521a28b 2018-11-11T21:32:01 Embed hb_ot_shape_plan_t into hb_shape_plan_t No other shaper will need shape_plan_data, by definition. So, remove abstraction layer and always create hb_ot_shape_plan_t as part of hb_shape_plan_t.
Behdad Esfahbod 1beacdde 2018-11-11T16:35:28 Minor
Behdad Esfahbod 385f78b3 2018-11-07T17:19:21 [aat] Remove deleted-glyhs after applying kerx/kern Finally: Fixes https://github.com/harfbuzz/harfbuzz/issues/1356 Test case: $ ./hb-shape GeezaPro.ttc -u U+0628,U+064A,U+064E,U+0651,U+0629 [u0629.final.tehMarbuta=4+713|u064e_u0651.shaddaFatha=1@0,-200+0|u064a.medial.yeh=1+656|u0628.initial.beh=0+656] The mark positioning (kern table CrossStream kerning) only works if deleted glyph (as result of ligation) is still in stream and pushed through the state machine.
Behdad Esfahbod ca23567f 2018-11-07T16:19:51 Disable fallback mark positioning if kern table has cross-stream kerning Happens even if the cross-stream kerning is for cursive attachment only. Oh well..
Behdad Esfahbod 5cf6f94d 2018-11-07T16:07:22 Don't apply both kerx and kern Ouch!
Behdad Esfahbod 41cff7af 2018-11-07T16:05:36 Minor
Behdad Esfahbod 649cc3ef 2018-11-07T14:04:04 [kerx] Don't disable crossKerning if kern feature is off
Behdad Esfahbod 0c3b061a 2018-11-07T13:58:41 [kern] Apply erlier, where GPOS/kerx are applied
Behdad Esfahbod 914b595f 2018-11-05T22:39:50 [ot-face] Include hb-ot-face directly in hb_face_t Simplifying access coming next.
Behdad Esfahbod 17335a81 2018-11-04T02:25:07 Clean up buffer->swap_buffers() calls That function checks for buffer->successful already. No need to check at call site.