From 7c495234627b1fefaf2bbfa0e5ab5fbdaf5b4109 Mon Sep 17 00:00:00 2001 From: "mitz@apple.com" Date: Tue, 18 Dec 2007 18:58:57 +0000 Subject: [PATCH] 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): git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28832 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- WebCore/ChangeLog | 10 ++++++++++ WebCore/platform/graphics/win/FontCacheWin.cpp | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index 2d0fd19b11cb..166d7afb15dd 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,3 +1,13 @@ +2007-12-18 Dan Bernstein + + 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 Reviewed by Adele diff --git a/WebCore/platform/graphics/win/FontCacheWin.cpp b/WebCore/platform/graphics/win/FontCacheWin.cpp index 84735e58fa72..c7381dac2743 100644 --- a/WebCore/platform/graphics/win/FontCacheWin.cpp +++ b/WebCore/platform/graphics/win/FontCacheWin.cpp @@ -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); -- 2.36.0