Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Unified Diff: Source/platform/fonts/SimpleFontData.cpp

Issue 1020833002: Remove duplicate Enum Font Pitch (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebasing patch Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/fonts/SimpleFontData.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/SimpleFontData.cpp
diff --git a/Source/platform/fonts/SimpleFontData.cpp b/Source/platform/fonts/SimpleFontData.cpp
index 8cb618c1f7feb989e55a4a5385a30c52bad214cb..a3bec2c9405901be92b641be315f13df2c40f757 100644
--- a/Source/platform/fonts/SimpleFontData.cpp
+++ b/Source/platform/fonts/SimpleFontData.cpp
@@ -57,7 +57,7 @@ SimpleFontData::SimpleFontData(const FontPlatformData& platformData, PassRefPtr<
: m_maxCharWidth(-1)
, m_avgCharWidth(-1)
, m_platformData(platformData)
- , m_treatAsFixedPitch(false)
+ , m_pitch(UnknownPitchFont)
, m_isTextOrientationFallback(isTextOrientationFallback)
, m_isBrokenIdeographFallback(false)
, m_verticalData(nullptr)
@@ -74,7 +74,7 @@ SimpleFontData::SimpleFontData(const FontPlatformData& platformData, PassRefPtr<
SimpleFontData::SimpleFontData(PassRefPtr<CustomFontData> customData, float fontSize, bool syntheticBold, bool syntheticItalic)
: m_platformData(FontPlatformData(fontSize, syntheticBold, syntheticItalic))
- , m_treatAsFixedPitch(false)
+ , m_pitch(UnknownPitchFont)
, m_isTextOrientationFallback(false)
, m_isBrokenIdeographFallback(false)
, m_verticalData(nullptr)
@@ -399,7 +399,7 @@ PassRefPtr<SimpleFontData> SimpleFontData::platformCreateScaledFontData(const Fo
void SimpleFontData::determinePitch()
{
- m_treatAsFixedPitch = platformData().isFixedPitch();
+ m_pitch = platformData().isFixedPitch() ? FixedPitchFont : VariablePitchFont;
}
static inline void getSkiaBoundsForGlyph(SkPaint& paint, Glyph glyph, SkRect& bounds)
« no previous file with comments | « Source/platform/fonts/SimpleFontData.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698