haikuwebkit/Source/WebCore/rendering/mathml
Myles C. Maxfield 03cbc4b111 [Cocoa] Single characters don't get shaped in the fast text codepath
https://bugs.webkit.org/show_bug.cgi?id=186804

Reviewed by Alan Bujtas.

Source/WebCore:

Previously, single characters weren't shaped in the fast text codepath,
because shaping in the fast text codepath was just for kerning and
ligatures. Kerning didn't need to shape individual characters because
kerning only applies to pairs of characters, and ligatures didn't need
to shape individual characters because two characters are required to
form a ligature. However, now that we want to replace the complex text
codepath with a new-and-improved fast text codepath, we have to perform
all shaping in the fast text codepath, regardless of how many characters
are present.

Test: fast/text/single-character-shaping.html

* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::applyFontTransforms):
(WebCore::WidthIterator::commitCurrentFontRange):
(WebCore::WidthIterator::advanceInternal):
(WebCore::WidthIterator::shouldApplyFontTransforms const): Deleted.
* platform/graphics/WidthIterator.h:
* platform/graphics/coretext/FontCoreText.cpp:
(WebCore::Font::applyTransforms): Keep kerning disabled for single glyphs,
because of performance. This will be able to be removed when rdar://82195405
is fixed.
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::computePreferredLogicalWidths):

Tools:

Huge thanks to Laurence Penney to contributing this test font!!!

* Scripts/webkitpy/common/config/contributors.json:

LayoutTests:

Huge thanks to Laurence Penney to contributing this test font!!!

* fast/text/resources/UniversTofu-GSUB-rvrn.ttf: Added. The license is Apache 2.0.
* fast/text/single-character-shaping-expected.html: Added.
* fast/text/single-character-shaping.html: Added.


Canonical link: https://commits.webkit.org/240793@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281378 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-21 19:18:51 +00:00
..
MathMLStyle.cpp Remove WTF::Optional synonym for std::optional, using that class template directly instead 2021-05-30 16:11:40 +00:00
MathMLStyle.h
MathOperator.cpp
MathOperator.h
RenderMathMLBlock.cpp Rename RootInlineBox to LegacyRootInlineBox 2021-06-02 16:20:15 +00:00
RenderMathMLBlock.h Remove WTF::Optional synonym for std::optional, using that class template directly instead 2021-05-30 16:11:40 +00:00
RenderMathMLFenced.cpp
RenderMathMLFenced.h
RenderMathMLFencedOperator.cpp
RenderMathMLFencedOperator.h
RenderMathMLFraction.cpp Remove WTF::Optional synonym for std::optional, using that class template directly instead 2021-05-30 16:11:40 +00:00
RenderMathMLFraction.h Remove WTF::Optional synonym for std::optional, using that class template directly instead 2021-05-30 16:11:40 +00:00
RenderMathMLMath.cpp
RenderMathMLMath.h
RenderMathMLMenclose.cpp
RenderMathMLMenclose.h
RenderMathMLOperator.cpp [Cocoa] Single characters don't get shaped in the fast text codepath 2021-08-21 19:18:51 +00:00
RenderMathMLOperator.h Remove WTF::Optional synonym for std::optional, using that class template directly instead 2021-05-30 16:11:40 +00:00
RenderMathMLPadded.cpp Remove WTF::Optional synonym for std::optional, using that class template directly instead 2021-05-30 16:11:40 +00:00
RenderMathMLPadded.h Remove WTF::Optional synonym for std::optional, using that class template directly instead 2021-05-30 16:11:40 +00:00
RenderMathMLRoot.cpp
RenderMathMLRoot.h
RenderMathMLRow.cpp Remove WTF::Optional synonym for std::optional, using that class template directly instead 2021-05-30 16:11:40 +00:00
RenderMathMLRow.h Remove WTF::Optional synonym for std::optional, using that class template directly instead 2021-05-30 16:11:40 +00:00
RenderMathMLScripts.cpp Remove WTF::Optional synonym for std::optional, using that class template directly instead 2021-05-30 16:11:40 +00:00
RenderMathMLScripts.h Remove WTF::Optional synonym for std::optional, using that class template directly instead 2021-05-30 16:11:40 +00:00
RenderMathMLSpace.cpp Remove WTF::Optional synonym for std::optional, using that class template directly instead 2021-05-30 16:11:40 +00:00
RenderMathMLSpace.h Remove WTF::Optional synonym for std::optional, using that class template directly instead 2021-05-30 16:11:40 +00:00
RenderMathMLToken.cpp Remove WTF::Optional synonym for std::optional, using that class template directly instead 2021-05-30 16:11:40 +00:00
RenderMathMLToken.h Remove WTF::Optional synonym for std::optional, using that class template directly instead 2021-05-30 16:11:40 +00:00
RenderMathMLUnderOver.cpp
RenderMathMLUnderOver.h