⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 98765 in webkit


Ignore:
Timestamp:
Oct 28, 2011, 2:41:43 PM (15 years ago)
Author:
mitz@apple.com
Message:

<rdar://problem/10288006> Emoji characters are too close to each other in small font size

Reviewed by Sam Weinig.

Source/WebCore:

  • platform/graphics/mac/SimpleFontDataMac.mm:

(WebCore::SimpleFontData::platformWidthForGlyph): If the font is a color bitmap font, use
-[NSFont advancementForGlyph:] instead of wkGetGlyphTransformedAdvances().

LayoutTests:

  • platform/mac/fast/css/font-family-pictograph-expected.txt:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r98763 r98765  
     12011-10-28  Dan Bernstein  <mitz@apple.com>
     2
     3        <rdar://problem/10288006> Emoji characters are too close to each other in small font size
     4
     5        Reviewed by Sam Weinig.
     6
     7        * platform/mac/fast/css/font-family-pictograph-expected.txt:
     8
    192011-10-28  Ken Buchanan <kenrb@chromium.org>
    210
  • trunk/LayoutTests/platform/mac/fast/css/font-family-pictograph-expected.txt

    r91777 r98765  
    55    RenderBody {BODY} at (8,8) size 784x584
    66      RenderBlock {DIV} at (0,0) size 784x95
    7         RenderText {#text} at (0,0) size 72x95
    8           text run at (0,0) width 72: "\x{2665}"
     7        RenderText {#text} at (0,0) size 73x95
     8          text run at (0,0) width 73: "\x{2665}"
  • trunk/Source/WebCore/ChangeLog

    r98764 r98765  
     12011-10-28  Dan Bernstein  <mitz@apple.com>
     2
     3        <rdar://problem/10288006> Emoji characters are too close to each other in small font size
     4
     5        Reviewed by Sam Weinig.
     6
     7        * platform/graphics/mac/SimpleFontDataMac.mm:
     8        (WebCore::SimpleFontData::platformWidthForGlyph): If the font is a color bitmap font, use
     9        -[NSFont advancementForGlyph:] instead of wkGetGlyphTransformedAdvances().
     10
    1112011-10-28  Adam Barth  <abarth@webkit.org>
    212
  • trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm

    r95391 r98765  
    401401    CGSize advance = CGSizeZero;
    402402    if (platformData().orientation() == Horizontal || m_isBrokenIdeographFallback) {
    403         NSFont* font = platformData().font();
    404         float pointSize = platformData().m_size;
    405         CGAffineTransform m = CGAffineTransformMakeScale(pointSize, pointSize);
    406         if (!wkGetGlyphTransformedAdvances(platformData().cgFont(), font, &m, &glyph, &advance)) {
    407             LOG_ERROR("Unable to cache glyph widths for %@ %f", [font displayName], pointSize);
    408             advance.width = 0;
     403        NSFont *font = platformData().font();
     404        if (font && platformData().isColorBitmapFont())
     405            advance = [font advancementForGlyph:glyph];
     406        else {
     407            float pointSize = platformData().m_size;
     408            CGAffineTransform m = CGAffineTransformMakeScale(pointSize, pointSize);
     409            if (!wkGetGlyphTransformedAdvances(platformData().cgFont(), font, &m, &glyph, &advance)) {
     410                LOG_ERROR("Unable to cache glyph widths for %@ %f", [font displayName], pointSize);
     411                advance.width = 0;
     412            }
    409413        }
    410414    } else
Note: See TracChangeset for help on using the changeset viewer.