Changeset 58341 in webkit


Ignore:
Timestamp:
Apr 27, 2010 2:53:54 PM (14 years ago)
Author:
evan@chromium.org
Message:

2010-04-27 Evan Martin <evan@chromium.org>

Reviewed by David Levin.

[chromium] bold bengali text not rendered properly on Linux
https://bugs.webkit.org/show_bug.cgi?id=37904

Add a layout test containing some bold Bengali text.

  • fast/text/international/bold-bengali.html: Added.
  • platform/chromium-linux/fast/text/international/bold-bengali-expected.checksum: Added.
  • platform/chromium-linux/fast/text/international/bold-bengali-expected.png: Added.
  • platform/chromium-linux/fast/text/international/bold-bengali-expected.txt: Added.

2010-04-27 Evan Martin <evan@chromium.org>

Reviewed by David Levin.

[chromium] bold bengali text not rendered properly on Linux
https://bugs.webkit.org/show_bug.cgi?id=37904

We must let Skia do font fallback, rather than picking a font name
then handing that to Skia. For example, if we have Bengali text and
choose FreeSans + fake bold, and then later reuse the name, Skia will
helpfully use FreeSansBold (which doesn't cover Bengali).

Test: fast/text/international/bold-bengali.html

  • platform/graphics/chromium/FontCacheLinux.cpp: (WebCore::FontCache::getFontDataForCharacters):

2010-04-27 Evan Martin <evan@chromium.org>

Reviewed by David Levin.

[chromium] bold bengali text not rendered properly on Linux
Roll forward Chrome DEPS so we get new Skia API.

  • DEPS: update Chrome to r45696.
Location:
trunk
Files:
4 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r58339 r58341  
     12010-04-27  Evan Martin  <evan@chromium.org>
     2
     3        Reviewed by David Levin.
     4
     5        [chromium] bold bengali text not rendered properly on Linux
     6        https://bugs.webkit.org/show_bug.cgi?id=37904
     7
     8        Add a layout test containing some bold Bengali text.
     9
     10        * fast/text/international/bold-bengali.html: Added.
     11        * platform/chromium-linux/fast/text/international/bold-bengali-expected.checksum: Added.
     12        * platform/chromium-linux/fast/text/international/bold-bengali-expected.png: Added.
     13        * platform/chromium-linux/fast/text/international/bold-bengali-expected.txt: Added.
     14
    1152010-04-27  Adam Barth  <abarth@webkit.org>
    216
  • trunk/WebCore/ChangeLog

    r58340 r58341  
     12010-04-27  Evan Martin  <evan@chromium.org>
     2
     3        Reviewed by David Levin.
     4
     5        [chromium] bold bengali text not rendered properly on Linux
     6        https://bugs.webkit.org/show_bug.cgi?id=37904
     7
     8        We must let Skia do font fallback, rather than picking a font name
     9        then handing that to Skia.  For example, if we have Bengali text and
     10        choose FreeSans + fake bold, and then later reuse the name, Skia will
     11        helpfully use FreeSansBold (which doesn't cover Bengali).
     12
     13        Test: fast/text/international/bold-bengali.html
     14
     15        * platform/graphics/chromium/FontCacheLinux.cpp:
     16        (WebCore::FontCache::getFontDataForCharacters):
     17
    1182010-04-27  James Robinson  <jamesr@chromium.org>
    219
  • trunk/WebCore/platform/chromium/ChromiumBridge.h

    r55784 r58341  
    117117#if OS(LINUX)
    118118        static void getRenderStyleForStrike(const char* family, int sizeAndStyle, FontRenderStyle* result);
     119        // This code is currently in the process of getting rejiggered, and though
     120        // it is not currently used, it will hopefully be used again soon.
    119121        static String getFontFamilyForCharacters(const UChar*, size_t numCharacters);
    120122#endif
  • trunk/WebCore/platform/graphics/chromium/FontCacheLinux.cpp

    r57027 r58341  
    5959                                                          int length)
    6060{
    61     String family = ChromiumBridge::getFontFamilyForCharacters(characters, length);
    62     if (family.isEmpty())
     61    int style = SkTypeface::kNormal;
     62    if (font.fontDescription().weight() >= FontWeightBold)
     63        style |= SkTypeface::kBold;
     64    if (font.fontDescription().italic())
     65        style |= SkTypeface::kItalic;
     66
     67    SkTypeface* tf = SkTypeface::CreateForChars(characters, length * 2,
     68                                                static_cast<SkTypeface::Style>(style));
     69    if (!tf)
    6370        return 0;
    6471
    65     AtomicString atomicFamily(family);
    66     return getCachedFontData(getCachedFontPlatformData(font.fontDescription(), atomicFamily, false));
     72    // FIXME: we don't have a family name for this font.
     73    // However, the family name within FontPlatformData is only used when picking
     74    // a render style for the font, so it's not too great of a loss.
     75    FontPlatformData result(tf,
     76                            "",
     77                            font.fontDescription().computedSize(),
     78                            (style & SkTypeface::kBold) && !tf->isBold(),
     79                            (style & SkTypeface::kItalic) && !tf->isItalic());
     80    tf->unref();
     81    return getCachedFontData(&result);
    6782}
    6883
  • trunk/WebKit/chromium/ChangeLog

    r58312 r58341  
     12010-04-27  Evan Martin  <evan@chromium.org>
     2
     3        Reviewed by David Levin.
     4
     5        [chromium] bold bengali text not rendered properly on Linux
     6        Roll forward Chrome DEPS so we get new Skia API.
     7
     8        * DEPS: update Chrome to r45696.
     9
    1102010-04-27  Andrey Kosyakov  <caseq@chromium.org>
    211
  • trunk/WebKit/chromium/DEPS

    r58240 r58341  
    3333vars = {
    3434  'chromium_svn': 'http://src.chromium.org/svn/trunk/src',
    35   'chromium_rev': '45294',
     35  'chromium_rev': '45696',
    3636
    3737  'pthreads-win32_rev': '26716',
Note: See TracChangeset for help on using the changeset viewer.