summaryrefslogtreecommitdiff
path: root/src/font_size.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-01-13 23:04:11 +0000
committerCarl Hetherington <cth@carlh.net>2015-01-13 23:04:11 +0000
commitf1ba458a19a9b998ecdb1db726106876953abcc0 (patch)
tree1e414103fec758275f92dff3b7973cc02dbf39a3 /src/font_size.cc
parentd15ef17dccf87b633d1971c38032a2049abe3db0 (diff)
Various development / fixes.rework
Diffstat (limited to 'src/font_size.cc')
-rw-r--r--src/font_size.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/font_size.cc b/src/font_size.cc
index d11ee89..7d556af 100644
--- a/src/font_size.cc
+++ b/src/font_size.cc
@@ -40,3 +40,15 @@ FontSize::points (int screen_height_in_points) const
return _proportional.get() * screen_height_in_points;
}
+
+bool
+FontSize::operator== (FontSize const & other) const
+{
+ if (_proportional && other._proportional) {
+ return _proportional.get() == other._proportional.get();
+ } else if (_points && other._points) {
+ return _points.get() == other._points.get();
+ }
+
+ return false;
+}