Bug 255298 - Object replacement character (0xFFFC) generates null (0) glyph
Summary: Object replacement character (0xFFFC) generates null (0) glyph
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords: InRadar
: 256372 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-04-11 12:30 PDT by Vitor Roriz
Modified: 2023-06-05 20:02 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vitor Roriz 2023-04-11 12:30:48 PDT
We are getting an empty glyphData object (thus a null glyph (0)) when the input character is the object replacement character (0xFFFC).
If such input is decorated with text-emphasis-marker, this will cause the marker not to be painted after https://github.com/WebKit/WebKit/pull/12471 is merged.

This is because, the null glyph gets replaced by the deleted glyph (0xFFFF) and after the PR is merged, we no longer will draw markers for associated deleted glyphs.

How to reproduce it:


<p class="foo">X</p>

.foo {
  writing-mode:vertical-lr;
  text-combine-upright:all;
  text-emphasis:filled;
}
Comment 1 Radar WebKit Bug Importer 2023-04-11 12:31:01 PDT
<rdar://problem/107897203>
Comment 2 Sam Sneddon [:gsnedders] 2023-05-05 12:32:56 PDT
*** Bug 256372 has been marked as a duplicate of this bug. ***
Comment 3 Myles C. Maxfield 2023-05-22 14:56:34 PDT
It's totally legit for characters to be mapped to the 0 glyph. The fact that the object replacement character gets mapped to the 0 glyph isn't a bug; it's expected.

If we recently added logic that says "the 0 glyph shouldn't get an emphasis mark" then that logic is wrong.
Comment 4 Myles C. Maxfield 2023-06-02 15:43:01 PDT
Pull request: https://github.com/WebKit/WebKit/pull/14642
Comment 5 EWS 2023-06-05 20:02:13 PDT
Committed 264886@main (aba48e65ac8b): <https://commits.webkit.org/264886@main>

Reviewed commits have been landed. Closing PR #14642 and removing active labels.