WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
228536
[Win][Uniscribe] Remove the code rounding off glyph advances and offsets for non system fonts
https://bugs.webkit.org/show_bug.cgi?id=228536
Summary
[Win][Uniscribe] Remove the code rounding off glyph advances and offsets for ...
Fujii Hironori
Reported
2021-07-27 23:25:44 PDT
[Win][Uniscribe] Remove the code rounding off glyph advances and offsets for system fonts ComplexTextController::collectComplexTextRunsForCharacters has the following code.
> // Match AppKit's rules for the integer vs. non-integer rendering modes. > if (!font->platformData().isSystemFont()) { > advance = roundf(advance); > offsetX = roundf(offsetX); > offsetY = roundf(offsetY); > }
This was added by
r18359
. See also:
Bug#228363 Comment#2
Attachments
WIP patch
(3.24 KB, patch)
2021-07-27 23:52 PDT
,
Fujii Hironori
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
WIP patch
(4.78 KB, patch)
2021-07-28 22:48 PDT
,
Fujii Hironori
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Fujii Hironori
Comment 1
2021-07-27 23:31:31 PDT
(In reply to Fujii Hironori from
comment #0
)
> This was added by
r18359
.
No. This code was added by
r23462
.
Fujii Hironori
Comment 2
2021-07-27 23:36:41 PDT
(In reply to Fujii Hironori from
comment #1
)
> No. This code was added by
r23462
.
More precisely
r23199
and
r23154
.
Fujii Hironori
Comment 3
2021-07-27 23:52:45 PDT
Created
attachment 434405
[details]
WIP patch
Fujii Hironori
Comment 4
2021-07-28 14:55:05 PDT
In WinCairo, this patch makes the following ref tests fail. fast/text/emoji-gender-3.html [ ImageOnlyFailure ] fast/text/emoji-gender-4.html [ ImageOnlyFailure ] fast/text/emoji-gender-5.html [ ImageOnlyFailure ] fast/text/emoji-gender-6.html [ ImageOnlyFailure ] fast/text/emoji-gender-8.html [ ImageOnlyFailure ] This is caused by the difference of how to get glyph advance between simple text code path and complex text code path. The simple text code path is using cairo_scaled_font_glyph_extents, the complex text code path is using Uniscribe to get the glyph advance. I think the simple text code path also should use Uniscribe. However, the argument of Font::platformWidthForGlyph is Glyph not UChar. Uniscribe (ScriptShape) takes a string, not glyphs. Another approach is implementing Font::applyTransforms with Uniscribe (
Bug 228363
). However, Font::applyTransforms is not applied to a single character. This approach needs some modification to WidthIterator.
Fujii Hironori
Comment 5
2021-07-28 17:16:28 PDT
I confirmed WinCairo doesn't have the
comment#4
problem if it always uses the complex text code path. In the complex text code path, it consistently uses Uniscribe.
Fujii Hironori
Comment 6
2021-07-28 22:48:52 PDT
Created
attachment 434495
[details]
WIP patch The WinCairo problem is fixed by reimplementing Font::platformWidthForGlyph with GetCharABCWidthsI.
Radar WebKit Bug Importer
Comment 7
2021-08-03 23:26:17 PDT
<
rdar://problem/81500144
>
Fujii Hironori
Comment 8
2024-06-19 18:27:58 PDT
***
Bug 275674
has been marked as a duplicate of this bug. ***
Fujii Hironori
Comment 9
2024-06-19 22:12:54 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/29992
EWS
Comment 10
2024-06-20 13:06:43 PDT
Committed
280214@main
(7ec79836337c): <
https://commits.webkit.org/280214@main
> Reviewed commits have been landed. Closing PR #29992 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug