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

Unified Diff: Source/platform/fonts/FontMetrics.h

Issue 147703002: Calculate Underline thickness from Font (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Adding Test cases in TestExpectations Created 6 years, 10 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/rendering/InlineTextBox.cpp ('k') | Source/platform/fonts/mac/SimpleFontDataMac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/FontMetrics.h
diff --git a/Source/platform/fonts/FontMetrics.h b/Source/platform/fonts/FontMetrics.h
index dafed6a476fd80e2310e8b96d346e75d474735c8..2bfa54e75118b6e1e9e7266ccf6308f69ad5a07f 100644
--- a/Source/platform/fonts/FontMetrics.h
+++ b/Source/platform/fonts/FontMetrics.h
@@ -37,6 +37,7 @@ public:
, m_lineSpacing(0)
, m_xHeight(0)
, m_zeroWidth(0)
+ , m_underlinethickness(0)
, m_hasXHeight(false)
, m_hasZeroWidth(false)
{
@@ -122,6 +123,9 @@ public:
bool hasZeroWidth() const { return m_hasZeroWidth; }
void setHasZeroWidth(bool hasZeroWidth) { m_hasZeroWidth = hasZeroWidth; }
+ float underlineThickness() const { return m_underlinethickness; }
+ void setUnderlineThickness(float underlineThickness) { m_underlinethickness = underlineThickness; }
+
private:
friend class SimpleFontData;
@@ -134,6 +138,7 @@ private:
m_lineSpacing = 0;
m_xHeight = 0;
m_hasXHeight = false;
+ m_underlinethickness = 0;
}
unsigned m_unitsPerEm;
@@ -143,6 +148,7 @@ private:
float m_lineSpacing;
float m_xHeight;
float m_zeroWidth;
+ float m_underlinethickness;
bool m_hasXHeight;
bool m_hasZeroWidth;
};
« no previous file with comments | « Source/core/rendering/InlineTextBox.cpp ('k') | Source/platform/fonts/mac/SimpleFontDataMac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698