Changeset 46938 in webkit


Ignore:
Timestamp:
Aug 7, 2009 6:24:13 PM (15 years ago)
Author:
abarth@webkit.org
Message:

2009-08-07 Yong Li <yong.li@torchmobile.com>

Reviewed by Eric Seidel.

WINCE PORT: pass unrecognized glyphs to GDI to handle
https://bugs.webkit.org/show_bug.cgi?id=27734

  • platform/graphics/FontFastPath.cpp: (WebCore::Font::glyphDataForCharacter):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r46937 r46938  
     12009-08-07  Yong Li  <yong.li@torchmobile.com>
     2
     3        Reviewed by Eric Seidel.
     4
     5        WINCE PORT: pass unrecognized glyphs to GDI to handle
     6        https://bugs.webkit.org/show_bug.cgi?id=27734
     7
     8        * platform/graphics/FontFastPath.cpp:
     9        (WebCore::Font::glyphDataForCharacter):
     10
    1112009-08-07  Chris Marrin  <cmarrin@apple.com>
    212
  • trunk/WebCore/platform/graphics/FontFastPath.cpp

    r44672 r46938  
    22 * Copyright (C) 2003, 2006 Apple Computer, Inc.
    33 * Copyright (C) 2008 Holger Hans Peter Freyther
     4 * Copyright (C) 2009 Torch Mobile, Inc.
    45 *
    56 * This library is free software; you can redistribute it and/or
     
    156157        GlyphData data = fallbackPage && fallbackPage->fontDataForCharacter(c) ? fallbackPage->glyphDataForCharacter(c) : characterFontData->missingGlyphData();
    157158        // Cache it so we don't have to do system fallback again next time.
    158         if (!useSmallCapsFont)
     159        if (!useSmallCapsFont) {
     160#if PLATFORM(WINCE)
     161            // missingGlyphData returns a null character, which is not suitable for GDI to display.
     162            // Also, sometimes we cannot map a font for the character on WINCE, but GDI can still
     163            // display the character, probably because the font package is not installed correctly.
     164            // So we just always set the glyph to be same as the character, and let GDI solve it.
     165            page->setGlyphDataForCharacter(c, c, characterFontData);
     166            return page->glyphDataForCharacter(c);
     167#else
    159168            page->setGlyphDataForCharacter(c, data.glyph, data.fontData);
     169#endif
     170        }
    160171        return data;
    161172    }
     
    164175    // FIXME: It would be nicer to use the missing glyph from the last resort font instead.
    165176    GlyphData data = primaryFont()->missingGlyphData();
    166     if (!useSmallCapsFont)
     177    if (!useSmallCapsFont) {
     178#if PLATFORM(WINCE)
     179        // See comment about WINCE GDI handling near setGlyphDataForCharacter above.
     180        page->setGlyphDataForCharacter(c, c, data.fontData);
     181        return page->glyphDataForCharacter(c);
     182#else
    167183        page->setGlyphDataForCharacter(c, data.glyph, data.fontData);
     184#endif
     185    }
    168186    return data;
    169187}
Note: See TracChangeset for help on using the changeset viewer.