Skip to content
Commit 07a76977 authored by Koji Ishii's avatar Koji Ishii Committed by Chromium LUCI CQ
Browse files

[text-spacing-trim] Stop assuming offset 0 is safe-to-break

This patch stops `ShapeResult` to assume the offset 0 is
always safe-to-break.

It was an micro-optimization in the legacy engine, where the
first glyph of an output from HarfBuzz is safe-to-break.

NG shapes across elements and splits a `ShapeResult` into
multiple `ShapeResult`s. In that case, the first glyph of a
`ShapeResult` may not be safe-to-break.

Two relevant fixes:
* Fix `HanKerning` didn't add a synthesized unsafe-t-break for
  the first glyph because it wasn't used.
* Fix how `AddUnsafeToBreak` computes run-local offset when
  the start index isn't 0.

Fixed: 326903564
Change-Id: I66578f6a270a771c3cd974442e1c332a64d9a910
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5334684


Auto-Submit: Koji Ishii <kojii@chromium.org>
Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1267637}
parent ae533c65
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment