[Webkit-unassigned] [Bug 279008] text-emphasis only uses the first character in the grapheme cluster

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 2 13:39:10 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=279008

--- Comment #4 from zalan <zalan at apple.com> ---
Looks like drawEmphasisMarks is broken. using drawBidiText instead makes the bug go away (note that this is not a fix proposal)

diff --git a/Source/WebCore/rendering/TextPainter.cpp b/Source/WebCore/rendering/TextPainter.cpp
index 8a84ad92b70b..4be4f964b5b9 100644
--- a/Source/WebCore/rendering/TextPainter.cpp
+++ b/Source/WebCore/rendering/TextPainter.cpp
@@ -117,7 +117,7 @@ void TextPainter::paintTextOrEmphasisMarks(const FontCascade& font, const TextRu
     }

     if (!emphasisMark.isEmpty())
-        m_context.drawEmphasisMarks(font, textRun, emphasisMark, textOrigin + FloatSize(0, emphasisMarkOffset), startOffset, endOffset);
+        m_context.drawBidiText(font, TextRun { emphasisMark.string() }, textOrigin + FloatSize(0, emphasisMarkOffset));
     else if (startOffset || endOffset < textRun.length() || !m_glyphDisplayList)
         m_context.drawText(font, textRun, textOrigin, startOffset, endOffset);
     else {

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240902/e9d9a04b/attachment.htm>


More information about the webkit-unassigned mailing list