Changeset 28810 in webkit
- Timestamp:
- Dec 17, 2007 9:09:56 AM (16 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r28809 r28810 1 2007-12-17 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Maciej Stachowiak. 4 5 - fix <rdar://problem/5333260> Some Chinese characters in Text Encoding menu are bold, others are not 6 and <rdar://problem/5280188> Chinese text looks worse on Safari for Windows cf. Safari for Mac 7 8 * platform/graphics/win/FontCacheWin.cpp: 9 (WebCore::FontCache::getFontDataForCharacters): To ensure that font 10 linking gives consistent results for characters that are exclusive to 11 the simplified Chinese code page and characters that belong to that 12 code page and other code pages, always ask to map to simplified Chinese 13 alone first. 14 1 15 2007-12-17 Christian Dywan <christian@twotoasts.de> 2 16 -
trunk/WebCore/platform/graphics/win/FontCacheWin.cpp
r28765 r28810 93 93 langFontLink->GetStrCodePages(characters, length, acpCodePages, &actualCodePages, &cchActual); 94 94 if (cchActual) { 95 // If simplified Chinese is one of the actual code pages, make one call to MapFont() asking for 96 // simplified Chinese only (and ignore the result). This ensures that we get consistent answers 97 // for characters that are in the simplified Chinese code page as well as other code pages and 98 // characters that are exclusively in the simplified Chinese code page. 99 // FIXME: This needs to be done only once per primary font. We could set a bit in the FontPlatformData 100 // indicating that we have done this. 101 const UINT simplifiedChineseCP = 936; 102 UINT codePage; 95 103 HFONT result; 104 if (SUCCEEDED(langFontLink->CodePagesToCodePage(actualCodePages, simplifiedChineseCP, &codePage)) && codePage == simplifiedChineseCP) { 105 DWORD simplifiedChineseCodePages; 106 langFontLink->CodePageToCodePages(simplifiedChineseCP, &simplifiedChineseCodePages); 107 langFontLink->MapFont(hdc, simplifiedChineseCodePages, characters[0], &result); 108 langFontLink->ReleaseFont(result); 109 } 96 110 if (langFontLink->MapFont(hdc, actualCodePages, characters[0], &result) == S_OK) { 97 111 // Fill in a log font with the returned font from MLang, and then use that to create a new font.
Note: See TracChangeset
for help on using the changeset viewer.