Upright vertical text is completely broken for multi-code-unit codepoints
Created attachment 241899 [details] Patch
<rdar://problem/18421386>
Comment on attachment 241899 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=241899&action=review > Source/WebCore/platform/graphics/mac/GlyphPageTreeNodeMac.cpp:153 > - setGlyphDataForIndex(offset + stringIndices[i], glyphs[i], fontData); > + // Because of the size of the GlyphPage, the string will never straddle a code-unit size boundary > + unsigned index = U16_IS_LEAD(buffer[stringIndices[i]]) ? stringIndices[i] / 2 : stringIndices[i]; > + setGlyphDataForIndex(offset + index, glyphs[i], fontData); Shouldn’t you make this change in the else block below as well? It’s weird to write the logic this way, because we are relying on the fact that buffer is either uniformly BMP characters or surrogate pairs. It wouldn’t work otherwise. I think that instead you should use the glyphStep approach we use above.
Created attachment 241905 [details] Patch
http://trac.webkit.org/changeset/176372