| Index: third_party/WebKit/WebCore/platform/graphics/chromium/FontCacheChromiumWin.cpp
|
| ===================================================================
|
| --- third_party/WebKit/WebCore/platform/graphics/chromium/FontCacheChromiumWin.cpp (revision 9357)
|
| +++ third_party/WebKit/WebCore/platform/graphics/chromium/FontCacheChromiumWin.cpp (working copy)
|
| @@ -394,53 +394,18 @@
|
| family = panUniFonts[i];
|
| data = getCachedFontPlatformData(font.fontDescription(), AtomicString(family, wcslen(family)));
|
| }
|
| - if (i < numFonts) // we found the font that covers this character !
|
| + // When i-th font (0-base) in |panUniFonts| contains a character and
|
| + // we get out of the loop, |i| will be |i + 1|. That is, if only the
|
| + // last font in the array covers the character, |i| will be numFonts.
|
| + // So, we have to use '<=" rather than '<' to see if we found a font
|
| + // covering the character.
|
| + if (i <= numFonts)
|
| return getCachedFontData(data);
|
|
|
| return 0;
|
|
|
| }
|
|
|
| -const AtomicString& FontCache::alternateFamilyName(const AtomicString& familyName)
|
| -{
|
| - // Note that mapping to Courier is removed because
|
| - // because it's a bitmap font on Windows.
|
| - // Alias Courier -> Courier New
|
| - static AtomicString courier("Courier"), courierNew("Courier New");
|
| - if (equalIgnoringCase(familyName, courier))
|
| - return courierNew;
|
| -
|
| - // Alias Times <-> Times New Roman.
|
| - static AtomicString times("Times"), timesNewRoman("Times New Roman");
|
| - if (equalIgnoringCase(familyName, times))
|
| - return timesNewRoman;
|
| - if (equalIgnoringCase(familyName, timesNewRoman))
|
| - return times;
|
| -
|
| - // Alias Helvetica <-> Arial
|
| - static AtomicString arial("Arial"), helvetica("Helvetica");
|
| - if (equalIgnoringCase(familyName, helvetica))
|
| - return arial;
|
| - if (equalIgnoringCase(familyName, arial))
|
| - return helvetica;
|
| -
|
| - // We block bitmap fonts altogether so that we have to
|
| - // alias MS Sans Serif (bitmap font) -> Microsoft Sans Serif (truetype font)
|
| - static AtomicString msSans("MS Sans Serif");
|
| - static AtomicString microsoftSans("Microsoft Sans Serif");
|
| - if (equalIgnoringCase(familyName, msSans))
|
| - return microsoftSans;
|
| -
|
| - // Alias MS Serif (bitmap) -> Times New Roman (truetype font). There's no
|
| - // 'Microsoft Sans Serif-equivalent' for Serif.
|
| - static AtomicString msSerif("MS Serif");
|
| - if (equalIgnoringCase(familyName, msSerif))
|
| - return timesNewRoman;
|
| -
|
| - // FIXME: should we map 'system' to something ('Tahoma') ?
|
| - return emptyAtom;
|
| -}
|
| -
|
| FontPlatformData* FontCache::getSimilarFontPlatformData(const Font& font)
|
| {
|
| return 0;
|
|
|