Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1828)

Unified Diff: Source/platform/fonts/mac/GlyphPageTreeNodeMac.cpp

Issue 145473002: Chromium for Mac cannot print surrogate pair in vertical writing mode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added NeedsRebaseline Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/platform/mac/fast/text/vertical-surrogate-pair-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « LayoutTests/platform/mac/fast/text/vertical-surrogate-pair-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698