when the primary font does not have space glyph.
<rdar://88059633>
Created attachment 450492 [details] Patch
Created attachment 450529 [details] Patch
Created attachment 450538 [details] Patch
Created attachment 450559 [details] Patch
Committed r288914 (246654@main): <https://commits.webkit.org/246654@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 450559 [details].
Re-opened since this is blocked by bug 235998
Created attachment 450605 [details] Patch
null terminator? where we're going we don't need null terminator.
Committed r288944 (246674@main): <https://commits.webkit.org/246674@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 450605 [details].
Comment on attachment 450605 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=450605&action=review > Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp:94 > + return fontCascade.width(TextRun { String { &space, 1 } }); There are no performance problems with this?
(In reply to Myles C. Maxfield from comment #12) > Comment on attachment 450605 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=450605&action=review > > > Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp:94 > > + return fontCascade.width(TextRun { String { &space, 1 } }); > > There are no performance problems with this? I had run our classic PerformanceTests/Layout/line-layout-simple.html microbenchmark locally before landing this and it showed about 0.5% regression. I also tested it with a slightly different version of the patch: const auto& spaceGlyphData = fontCascade.glyphDataForCharacter(space, false); return (!spaceGlyphData.font ? fontCascade.spaceWidth() : spaceGlyphData.font>widthForGlyph(spaceGlyphData.glyph)) + fontCascade.letterSpacing(); and it came back with the same numbers.