Support shaping with context by implementing a way to shape a range within a buffer, thereby allowing the buffer outside of said range to be used as the pre- and post-context.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8fd9860a37236d0d424b33e344f71df12625a653 commit 8fd9860a37236d0d424b33e344f71df12625a653 Author: eae <eae@chromium.org> Date: Thu Feb 09 00:30:23 2017 Add support for shaping a substring to HarfBuzzShaper Add support to HarfBuzzShaper for shaping a portion of the supplied text content as identified by a start and end offset. This allows an instance of the shaper to be used to shape multiple portions, or segments, of the string with different fonts, styles and font feature settings as needed. This change also renames a couple of methods and fields to increase code readability and to avoid confusion. Significant renames described below: shapeResult() -> shape() harfBuzzBuffer -> buffer normalizedBuffer -> text normalizedBufferLength -> textLength Eventually this will also allow for context aware shaping by passing the surrounding text as context to harfbuzz when invoking shaping algorithm. TEST=Source/platform/fonts/shaping/HarfBuzzShaperTest.cpp BUG= 689155 R=drott@chromium.org Review-Url: https://codereview.chromium.org/2686503003 Cr-Commit-Position: refs/heads/master@{#449158} [modify] https://crrev.com/8fd9860a37236d0d424b33e344f71df12625a653/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShapeIterator.cpp [modify] https://crrev.com/8fd9860a37236d0d424b33e344f71df12625a653/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp [modify] https://crrev.com/8fd9860a37236d0d424b33e344f71df12625a653/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.h [modify] https://crrev.com/8fd9860a37236d0d424b33e344f71df12625a653/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaperTest.cpp [modify] https://crrev.com/8fd9860a37236d0d424b33e344f71df12625a653/third_party/WebKit/Source/platform/fonts/shaping/RunSegmenter.cpp [modify] https://crrev.com/8fd9860a37236d0d424b33e344f71df12625a653/third_party/WebKit/Source/platform/fonts/shaping/RunSegmenter.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3d591708efa7d967c4158fc03369a2bf11aeacc2 commit 3d591708efa7d967c4158fc03369a2bf11aeacc2 Author: eae <eae@chromium.org> Date: Sat Feb 18 18:11:37 2017 [LayoutNG] Shape items with context Change the inline-layout shaping approach in LayoutNG to shape each item with the full contetx of the NGInlineNode. BUG= 689155 R=kojii@chromium.org Review-Url: https://codereview.chromium.org/2702853002 Cr-Commit-Position: refs/heads/master@{#451478} [modify] https://crrev.com/3d591708efa7d967c4158fc03369a2bf11aeacc2/third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc [modify] https://crrev.com/3d591708efa7d967c4158fc03369a2bf11aeacc2/third_party/WebKit/Source/core/layout/ng/ng_inline_node.h [modify] https://crrev.com/3d591708efa7d967c4158fc03369a2bf11aeacc2/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.cpp [modify] https://crrev.com/3d591708efa7d967c4158fc03369a2bf11aeacc2/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/84d8af49b69b6ab89bde2d657b96c5f280fd439c commit 84d8af49b69b6ab89bde2d657b96c5f280fd439c Author: kojii <kojii@chromium.org> Date: Tue May 09 17:38:05 2017 Clamp RunInfo::num_characters when shaping ranges with context HarfBuzzShaper::ShapeSegment clamps ShapeResult::num_characters but RunInfo::num_characters was not clamped. This patch applies the same clamping to RunInfo::num_characters. BUG= 689155 Review-Url: https://codereview.chromium.org/2869893005 Cr-Commit-Position: refs/heads/master@{#470371} [modify] https://crrev.com/84d8af49b69b6ab89bde2d657b96c5f280fd439c/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp [modify] https://crrev.com/84d8af49b69b6ab89bde2d657b96c5f280fd439c/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaperTest.cpp [modify] https://crrev.com/84d8af49b69b6ab89bde2d657b96c5f280fd439c/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultTestInfo.cpp [modify] https://crrev.com/84d8af49b69b6ab89bde2d657b96c5f280fd439c/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultTestInfo.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3b352efa15e478d022b40fa38e64f90a7b86fc59 commit 3b352efa15e478d022b40fa38e64f90a7b86fc59 Author: Dominik Röttsches <drott@chromium.org> Date: Mon Aug 13 16:35:05 2018 Run more HarfBuzzShaperTests SafeToBreakMissingRun was a Mac only failure, SafeToBreakArabicCommonLigatures were Mac and Android only failures, ShapeArabicWithContext was waiting for range shaping to be implemented, which had been fixed in the meantime for non-Mac.. Bug: 689155 , 870712 Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng Change-Id: I5ce017be3417ef24720cfb5a9818384ebd148b6c Reviewed-on: https://chromium-review.googlesource.com/1162177 Commit-Queue: Dominik Röttsches <drott@chromium.org> Reviewed-by: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#582607} [modify] https://crrev.com/3b352efa15e478d022b40fa38e64f90a7b86fc59/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper_test.cc
Comment 1 by bugdroid1@chromium.org
, Feb 9 2017