Changeset 31424

Show
Ignore:
Timestamp:
03/28/08 19:21:00 (15 months ago)
Author:
hyatt@apple.com
Message:

2008-03-28 David Hyatt < hyatt@apple.com>

Back out the Ahem font antialiasing hack, since it is now no longer required for LCD antialiased text
to match the reference rendering on Acid 3.

  • platform/graphics/SimpleFontData.h:
  • platform/graphics/mac/FontMac.mm: (WebCore::Font::drawGlyphs):
  • platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::SimpleFontData::platformInit):
  • platform/graphics/win/FontCGWin.cpp: (WebCore::Font::drawGlyphs):
  • platform/graphics/win/SimpleFontDataCGWin.cpp: (WebCore::SimpleFontData::platformInit):
  • rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionNewFloats):
Location:
trunk/WebCore
Files:
7 modified

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r31419 r31424  
     12008-03-28  David Hyatt  <hyatt@apple.com> 
     2 
     3        Back out the Ahem font antialiasing hack, since it is now no longer required for LCD antialiased text 
     4        to match the reference rendering on Acid 3. 
     5 
     6        * platform/graphics/SimpleFontData.h: 
     7        * platform/graphics/mac/FontMac.mm: 
     8        (WebCore::Font::drawGlyphs): 
     9        * platform/graphics/mac/SimpleFontDataMac.mm: 
     10        (WebCore::SimpleFontData::platformInit): 
     11        * platform/graphics/win/FontCGWin.cpp: 
     12        (WebCore::Font::drawGlyphs): 
     13        * platform/graphics/win/SimpleFontDataCGWin.cpp: 
     14        (WebCore::SimpleFontData::platformInit): 
     15        * rendering/RenderBlock.cpp: 
     16        (WebCore::RenderBlock::positionNewFloats): 
     17 
    1182008-03-28  Brady Eidson  <beidson@apple.com> 
    219 
  • trunk/WebCore/platform/graphics/SimpleFontData.h

    r31322 r31424  
    162162#if PLATFORM(CG) 
    163163    float m_syntheticBoldOffset; 
    164     bool m_allowFontSmoothing; 
    165164#endif 
    166165 
  • trunk/WebCore/platform/graphics/mac/FontMac.mm

    r31356 r31424  
    639639 
    640640    bool originalShouldUseFontSmoothing = wkCGContextGetShouldSmoothFonts(cgContext); 
    641     bool newShouldUseFontSmoothing = WebCoreShouldUseFontSmoothing() && font->m_allowFontSmoothing; 
     641    bool newShouldUseFontSmoothing = WebCoreShouldUseFontSmoothing(); 
    642642     
    643643    if (originalShouldUseFontSmoothing != newShouldUseFontSmoothing) 
  • trunk/WebCore/platform/graphics/mac/SimpleFontDataMac.mm

    r31333 r31424  
    149149 
    150150    m_syntheticBoldOffset = m_font.m_syntheticBold ? 1.0f : 0.f; 
    151     m_allowFontSmoothing = true; 
    152151 
    153152    bool failedSetup = false; 
     
    258257    } else 
    259258        m_xHeight = [m_font.font() xHeight]; 
    260  
    261     // Workaround for strange CG antialiasing of the Ahem font. Limit to the Web font version. 
    262     if (isCustomFont()) { 
    263 #ifdef BUILDING_ON_TIGER 
    264         RetainPtr<CFStringRef> fullName(AdoptCF, wkCopyFullFontName(m_font.cgFont())); 
    265 #else 
    266         RetainPtr<CFStringRef> fullName(AdoptCF, CGFontCopyFullName(m_font.cgFont())); 
    267 #endif 
    268         String nameStr(fullName.get()); 
    269         m_allowFontSmoothing = (nameStr != "Ahem"); 
    270     } 
    271259} 
    272260 
  • trunk/WebCore/platform/graphics/win/FontCGWin.cpp

    r31356 r31424  
    267267    CGContextRef cgContext = graphicsContext->platformContext(); 
    268268 
    269     uint32_t oldFontSmoothingStyle = wkSetFontSmoothingStyle(cgContext, font->m_allowFontSmoothing); 
     269    uint32_t oldFontSmoothingStyle = wkSetFontSmoothingStyle(cgContext, true); 
    270270 
    271271    const FontPlatformData& platformData = font->platformData(); 
  • trunk/WebCore/platform/graphics/win/SimpleFontDataCGWin.cpp

    r31327 r31424  
    5454{ 
    5555    m_syntheticBoldOffset = m_font.syntheticBold() ? 1.0f : 0.f; 
    56     m_allowFontSmoothing = true; 
    5756    m_scriptCache = 0; 
    5857    m_scriptFontProperties = 0; 
     
    116115        m_xHeight = scaleEmToUnits(iXHeight, m_unitsPerEm) * pointSize; 
    117116    } 
    118      
    119     // Workaround for strange CG antialiasing of the Ahem font. Limit to the Web font version. 
    120     if (isCustomFont()) { 
    121         RetainPtr<CFStringRef> fullName(AdoptCF, CGFontCopyFullName(m_font.cgFont())); 
    122         String nameStr(fullName.get()); 
    123         m_allowFontSmoothing = (nameStr != "Ahem"); 
    124     } 
    125117} 
    126118 
  • trunk/WebCore/rendering/RenderBlock.cpp

    r31250 r31424  
    22302230                fx = rightRelOffset(y, ro, false, &heightRemainingRight); 
    22312231            } 
    2232             fx = max(f->m_width, fx); 
    22332232            f->m_left = fx - f->m_width; 
    22342233            o->setPos(fx - o->marginRight() - o->width(), y + o->marginTop());