From 96a9f791f2dbad2671db4f5270416c1e74fc8ec6 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Fri, 6 May 2011 11:49:30 +0000 Subject: [PATCH] Fix some fixed-width CJK http://code.google.com/p/skia/issues/detail?id=222 git-svn-id: http://skia.googlecode.com/svn/trunk@1261 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/ports/SkFontHost_FreeType.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp index 280e0a10a5..5ed66c883a 100644 --- a/src/ports/SkFontHost_FreeType.cpp +++ b/src/ports/SkFontHost_FreeType.cpp @@ -663,6 +663,11 @@ SkScalerContext_FreeType::SkScalerContext_FreeType(const SkDescriptor* desc) if ((fRec.fFlags & SkScalerContext::kEmbeddedBitmapText_Flag) == 0) loadFlags |= FT_LOAD_NO_BITMAP; + // Always using FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH to get correct + // advances, as fontconfig and cairo do. + // See http://code.google.com/p/skia/issues/detail?id=222. + loadFlags |= FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH; + fLoadGlyphFlags = loadFlags; }