New issue
Advanced search Search tips

Issue 817271 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug

Blocking:
issue 636993



Sign in to add a comment

ShapeResult::num_characters is -1 when small-caps is used

Project Member Reported by kojii@chromium.org, Feb 28 2018

Issue description

Comment 1 by kojii@chromium.org, Feb 28 2018

Blocking: 636993

Comment 2 by kojii@chromium.org, Feb 28 2018

Summary: ShapeResult::num_characters is -1 when small-caps is used (was: ShapeResult::num_characters is -1 in some cases)
Test:
https://chromium-review.googlesource.com/c/chromium/src/+/940783

Comment 3 by drott@chromium.org, Feb 28 2018

Thanks for spotting that, please assign it to me if you would like me to take a look? Or are you going to investigate yourself? Perhaps something wrong in https://cs.chromium.org/chromium/src/third_party/WebKit/Source/platform/fonts/shaping/CaseMappingHarfBuzzBufferFiller.h?q=HarfBuzzBufferFiller&sq=package:chromium&dr=CSs&l=5


Comment 4 by kojii@chromium.org, Feb 28 2018

Cc: -drott@chromium.org kojii@chromium.org
Owner: drott@chromium.org
Great if you can take a look, thank you!

Note, this may not repro on Windows due to different kerning.

Comment 5 by drott@chromium.org, Mar 13 2018

Status: Started (was: Assigned)
Project Member

Comment 6 by bugdroid1@chromium.org, Mar 15 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1f84e158253c2f39665f848d124460f20aca1179

commit 1f84e158253c2f39665f848d124460f20aca1179
Author: Dominik Röttsches <drott@chromium.org>
Date: Thu Mar 15 19:02:56 2018

Fix subrange shaping logic when small caps feature is active

The existing logic was to exclude segmenter output that does not overlap
with range start and range end (HarfBuzzShaper::Shape) and to restrict
shaping to the character indexes of the queue items that contribute to
the desired range. However, the latter restriction only worked if the
case mapping for small caps did not chop up the queue items further, due
to case change segmentation. Adding an early-out if the result of case
mapping chopping produces queue items that fall outside the desired
range.

Thanks to kojii@ for the report and initial test case.

Bug:  817271 
Test: RangeShapeSmallCaps
Change-Id: If8c0b00343e7b1c9a342305e5f44fa515ba3576c
Reviewed-on: https://chromium-review.googlesource.com/964445
Reviewed-by: Emil A Eklund <eae@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Dominik Röttsches <drott@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543464}
[modify] https://crrev.com/1f84e158253c2f39665f848d124460f20aca1179/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp
[modify] https://crrev.com/1f84e158253c2f39665f848d124460f20aca1179/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaperTest.cpp

Comment 7 by drott@chromium.org, Mar 15 2018

Status: Fixed (was: Started)

Sign in to add a comment