| Index: Source/core/platform/graphics/chromium/SimpleFontDataChromiumWin.cpp
|
| diff --git a/Source/core/platform/graphics/chromium/SimpleFontDataChromiumWin.cpp b/Source/core/platform/graphics/chromium/SimpleFontDataChromiumWin.cpp
|
| index 535a9a573585c415a675bc0103c49856afa26845..640b5d892601f6d9c7ad0c8122064472c38d2e60 100644
|
| --- a/Source/core/platform/graphics/chromium/SimpleFontDataChromiumWin.cpp
|
| +++ b/Source/core/platform/graphics/chromium/SimpleFontDataChromiumWin.cpp
|
| @@ -127,26 +127,7 @@ bool SimpleFontData::containsCharacters(const UChar* characters, int length) con
|
|
|
| void SimpleFontData::determinePitch()
|
| {
|
| - // TEXTMETRICS have this. Set m_treatAsFixedPitch based off that.
|
| - HWndDC dc(0);
|
| - HGDIOBJ oldFont = SelectObject(dc, m_platformData.hfont());
|
| -
|
| - // Yes, this looks backwards, but the fixed pitch bit is actually set if the font
|
| - // is *not* fixed pitch. Unbelievable but true.
|
| - TEXTMETRIC textMetric = {0};
|
| - if (!GetTextMetrics(dc, &textMetric)) {
|
| - if (FontPlatformData::ensureFontLoaded(m_platformData.hfont())) {
|
| - // Retry GetTextMetrics.
|
| - // FIXME: Handle gracefully the error if this call also fails.
|
| - // See http://crbug.com/6401.
|
| - if (!GetTextMetrics(dc, &textMetric))
|
| - LOG_ERROR("Unable to get the text metrics after second attempt");
|
| - }
|
| - }
|
| -
|
| - m_treatAsFixedPitch = ((textMetric.tmPitchAndFamily & TMPF_FIXED_PITCH) == 0);
|
| -
|
| - SelectObject(dc, oldFont);
|
| + m_treatAsFixedPitch = platformData().isFixedPitch();
|
| }
|
|
|
| FloatRect SimpleFontData::platformBoundsForGlyph(Glyph glyph) const
|
|
|