Chromium Code Reviews| Index: Source/platform/fonts/mac/GlyphPageTreeNodeMac.cpp |
| diff --git a/Source/platform/fonts/mac/GlyphPageTreeNodeMac.cpp b/Source/platform/fonts/mac/GlyphPageTreeNodeMac.cpp |
| index 704d10df7993fdb23ba8d6cf8bd8793ac8ef99ad..cb1e6a5bfdece7114ed55d41df57d5a817707d9f 100644 |
| --- a/Source/platform/fonts/mac/GlyphPageTreeNodeMac.cpp |
| +++ b/Source/platform/fonts/mac/GlyphPageTreeNodeMac.cpp |
| @@ -45,6 +45,16 @@ static bool shouldUseCoreText(UChar* buffer, unsigned bufferLength, const Simple |
| { |
| if (fontData->platformData().isCompositeFontReference()) |
| return true; |
| + |
| + // CoreText doesn't have vertical glyphs of surrogate pair characters, and we draw broken glyphs. |
|
leviw_travelin_and_unemployed
2014/01/28 19:16:40
If I understand this patch, your change is to make
|
| + // To work around that, we should not use CoreText, but this always returns horizontal glyphs. |
| + // FIXME: We should use vertical glyphs. |
|
leviw_travelin_and_unemployed
2014/01/28 19:16:40
Please add a reference to a bug number.
|
| + if (bufferLength >= 2 && U_IS_SURROGATE(buffer[0]) && fontData->hasVerticalGlyphs()) { |
| + ASSERT(U_IS_SURROGATE_LEAD(buffer[0])); |
| + ASSERT(U_IS_TRAIL(buffer[1])); |
| + return false; |
| + } |
| + |
| if (fontData->platformData().widthVariant() != RegularWidth || fontData->hasVerticalGlyphs()) { |
| // Ideographs don't have a vertical variant or width variants. |
| for (unsigned i = 0; i < bufferLength; ++i) { |