Changeset 21471 in webkit


Ignore:
Timestamp:
May 14, 2007 6:39:27 PM (17 years ago)
Author:
bdash
Message:

2007-05-14 Mitz Pettel <mitz@webkit.org>

Reviewed by Darin.

No test possible since this patch affects only Safari chrome.

  • platform/Font.cpp: (WebCore::Font::Font): Initialize m_isPlatformFont according to whether the Font object is derived from a FontPlatformData or not.
  • platform/Font.h: (WebCore::Font::isPlatformFont): Added. Returns whether this Font was derived from a platform font.
  • platform/mac/FontCacheMac.mm: (WebCore::FontCache::getFontDataForCharacters): Changed to not enable synthetic bold and italic in the fallback fonts if the original font was derived from a platform font.
Location:
trunk/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r21470 r21471  
     12007-05-14  Mitz Pettel  <mitz@webkit.org>
     2
     3        Reviewed by Darin.
     4
     5        - fix http://bugs.webkit.org/show_bug.cgi?id=13711
     6          REGRESSION - Bookmark Bar text rendering changed
     7
     8        No test possible since this patch affects only Safari chrome.
     9
     10        * platform/Font.cpp:
     11        (WebCore::Font::Font): Initialize m_isPlatformFont according to whether
     12        the Font object is derived from a FontPlatformData or not.
     13        * platform/Font.h:
     14        (WebCore::Font::isPlatformFont): Added. Returns whether this Font was
     15        derived from a platform font.
     16        * platform/mac/FontCacheMac.mm:
     17        (WebCore::FontCache::getFontDataForCharacters): Changed to not enable
     18        synthetic bold and italic in the fallback fonts if the original font
     19        was derived from a platform font.
     20
    1212007-05-14  Sam Weinig  <sam@webkit.org>
    222
  • trunk/WebCore/platform/Font.cpp

    r21293 r21471  
    283283    , m_letterSpacing(0)
    284284    , m_wordSpacing(0)
     285    , m_isPlatformFont(false)
    285286{
    286287}
     
    291292    , m_letterSpacing(letterSpacing)
    292293    , m_wordSpacing(wordSpacing)
     294    , m_isPlatformFont(false)
    293295{
    294296}
     
    299301    , m_letterSpacing(0)
    300302    , m_wordSpacing(0)
     303    , m_isPlatformFont(true)
    301304{
    302305    m_fontDescription.setUsePrinterFont(isPrinterFont);
     
    311314    , m_letterSpacing(other.m_letterSpacing)
    312315    , m_wordSpacing(other.m_wordSpacing)
     316    , m_isPlatformFont(other.m_isPlatformFont)
    313317{
    314318}
  • trunk/WebCore/platform/Font.h

    r21012 r21471  
    127127    bool bold() const { return m_fontDescription.bold(); }
    128128
     129    bool isPlatformFont() const { return m_isPlatformFont; }
     130
    129131#if PLATFORM(QT)
    130132    operator QFont() const;
     
    182184    short m_letterSpacing;
    183185    short m_wordSpacing;
     186    bool m_isPlatformFont;
    184187};
    185188
  • trunk/WebCore/platform/mac/FontCacheMac.mm

    r21279 r21471  
    160160
    161161    FontPlatformData alternateFont(substituteFont,
    162         (traits & NSBoldFontMask) && !(substituteFontTraits & NSBoldFontMask),
    163         (traits & NSItalicFontMask) && !(substituteFontTraits & NSItalicFontMask));
     162        !font.isPlatformFont() && (traits & NSBoldFontMask) && !(substituteFontTraits & NSBoldFontMask),
     163        !font.isPlatformFont() && (traits & NSItalicFontMask) && !(substituteFontTraits & NSItalicFontMask));
    164164    return getCachedFontData(&alternateFont);
    165165}
Note: See TracChangeset for help on using the changeset viewer.