Reviewed by Dave Hyatt.
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Dec 2007 18:58:57 +0000 (18:58 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Dec 2007 18:58:57 +0000 (18:58 +0000)
        - avoid the simplified Chinese font linking code for characters that are
          not in any Windows code page

        * platform/graphics/win/FontCacheWin.cpp:
        (WebCore::FontCache::getFontDataForCharacters):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28832 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/graphics/win/FontCacheWin.cpp

index 2d0fd19b11cb533588d592bc16d607ae1929f373..166d7afb15dd1fbc255ccfcc2a043eae67a560b2 100644 (file)
@@ -1,3 +1,13 @@
+2007-12-18  Dan Bernstein  <mitz@apple.com>
+
+        Reviewed by Dave Hyatt.
+
+        - avoid the simplified Chinese font linking code for characters that are
+          not in any Windows code page
+
+        * platform/graphics/win/FontCacheWin.cpp:
+        (WebCore::FontCache::getFontDataForCharacters):
+
 2007-12-18  Brady Eidson <beidson@apple.com>
 
         Reviewed by Adele
index 84735e58fa728346c88e83b9ea7f1be5a2a28ab6..c7381dac27432a7ad8e2ba16b650266629cac38c 100644 (file)
@@ -101,7 +101,7 @@ const FontData* FontCache::getFontDataForCharacters(const Font& font, const UCha
         const UINT simplifiedChineseCP = 936;
         UINT codePage;
         HFONT result;
-        if (SUCCEEDED(langFontLink->CodePagesToCodePage(actualCodePages, simplifiedChineseCP, &codePage)) && codePage == simplifiedChineseCP) {
+        if (actualCodePages && SUCCEEDED(langFontLink->CodePagesToCodePage(actualCodePages, simplifiedChineseCP, &codePage)) && codePage == simplifiedChineseCP) {
             DWORD simplifiedChineseCodePages;
             langFontLink->CodePageToCodePages(simplifiedChineseCP, &simplifiedChineseCodePages);
             langFontLink->MapFont(hdc, simplifiedChineseCodePages, characters[0], &result);