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

Unified Diff: Source/core/platform/graphics/FontDescription.cpp

Issue 18551004: Miscellaneous cleanup to reduce number of includes in platform/graphics/ Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 6 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/core/platform/graphics/FontDescription.h ('k') | Source/core/platform/graphics/GraphicsContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/graphics/FontDescription.cpp
diff --git a/Source/core/platform/graphics/FontDescription.cpp b/Source/core/platform/graphics/FontDescription.cpp
index 5b0f32cf25d09da10d78d139dc27e284e73cfdab..25ad74cb10268ce01c96fe359a8e7307c2a82c08 100644
--- a/Source/core/platform/graphics/FontDescription.cpp
+++ b/Source/core/platform/graphics/FontDescription.cpp
@@ -30,6 +30,8 @@
#include "config.h"
#include "core/platform/graphics/FontDescription.h"
+#include "FontFamilyNames.h"
+
namespace WebCore {
struct SameSizeAsFontDescription {
@@ -87,6 +89,12 @@ FontWeight FontDescription::bolderWeight(void) const
return FontWeightNormal;
}
+bool FontDescription::useFixedDefaultSize() const
+{
+ // only use fixed default size when there is only one font family, and that family is "monospace"
+ return genericFamily() == MonospaceFamily && !family().next() && family().family() == FontFamilyNames::monospaceFamily;
+}
+
FontTraitsMask FontDescription::traitsMask() const
{
return static_cast<FontTraitsMask>((m_italic ? FontStyleItalicMask : FontStyleNormalMask)
« no previous file with comments | « Source/core/platform/graphics/FontDescription.h ('k') | Source/core/platform/graphics/GraphicsContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698