| Summary: | [GPU Process] [iOS] Vertical text is incorrectly displaced | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Devin Rousso <hi> | ||||||||
| Component: | Layout and Rendering | Assignee: | Said Abou-Hallawa <sabouhallawa> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | bfulgham, hi, jonlee, mmaxfield, sabouhallawa, simon.fraser, webkit-bug-importer, zalan | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | WebKit Nightly Build | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=234171 | ||||||||||
| Bug Depends on: | 232645 | ||||||||||
| Bug Blocks: | 239484 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Devin Rousso
2021-11-09 17:21:43 PST
Created attachment 456209 [details]
Patch
*** Bug 236907 has been marked as a duplicate of this bug. *** *** Bug 236908 has been marked as a duplicate of this bug. *** *** Bug 236911 has been marked as a duplicate of this bug. *** *** Bug 236916 has been marked as a duplicate of this bug. *** *** Bug 236921 has been marked as a duplicate of this bug. *** Comment on attachment 456209 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=456209&action=review > Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:-260 > - // Keep this in sync as the inverse of `fillVectorWithVerticalGlyphPositions`. I think I should keep this comment. The new code below does exactly what it says. Comment on attachment 456209 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=456209&action=review r=me because this is a step in the right direction, but I think there's more work to make this function exactly equal to the inverse of fillVectorWithVerticalGlyphPositions(). > Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:259 > + auto position = textMatrix.mapPoint(positions[0]); nit: a better name could be "initialPenPosition" or something >> Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:-260 >> - // Keep this in sync as the inverse of `fillVectorWithVerticalGlyphPositions`. > > I think I should keep this comment. The new code below does exactly what it says. Agreed. It's important to keep the reference to fillVectorWithVerticalGlyphPositions(). > Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:271 > + m_owner.drawGlyphsAndCacheFont(font, glyphs, computeAdvancesFromPositions(positions, count, textMatrix).data(), count, position, m_smoothingMode); This doesn't use rotateLeftTransform(). fillVectorWithVerticalGlyphPositions() does use rotateLeftTransform(), and this is supposed to be the inverse of that function. So I think there's more work that needs to be done here. Comment on attachment 456209 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=456209&action=review >> Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:259 >> + auto position = textMatrix.mapPoint(positions[0]); > > nit: a better name could be "initialPenPosition" or something The name was changed. >>> Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:-260 >>> - // Keep this in sync as the inverse of `fillVectorWithVerticalGlyphPositions`. >> >> I think I should keep this comment. The new code below does exactly what it says. > > Agreed. It's important to keep the reference to fillVectorWithVerticalGlyphPositions(). The comment was put back. >> Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:271 >> + m_owner.drawGlyphsAndCacheFont(font, glyphs, computeAdvancesFromPositions(positions, count, textMatrix).data(), count, position, m_smoothingMode); > > This doesn't use rotateLeftTransform(). fillVectorWithVerticalGlyphPositions() does use rotateLeftTransform(), and this is supposed to be the inverse of that function. So I think there's more work that needs to be done here. A FIXME comment was added. Created attachment 456297 [details]
Patch
Created attachment 456301 [details]
Patch
Committed r292198 (249101@main): <https://commits.webkit.org/249101@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 456301 [details]. Continuing work on this in https://bugs.webkit.org/show_bug.cgi?id=239484 |