summaryrefslogtreecommitdiff
diff options
authorTim Penhey <tim.penhey@canonical.com>2012-07-23 11:09:02 +1200
committerTim Penhey <tim.penhey@canonical.com>2012-07-23 11:09:02 +1200
commite8d50da9421c20d65b070891703bde69d043cd30 (patch)
tree1bd3b5362e04888664d6e4918f111daf59a4ac5e
parent0f67ef88cc2a123c0ca1729426c1077afe15da92 (diff)
Make sure that weight is always set.
(bzr r2501.4.3)
-rw-r--r--unity-shared/DashStyle.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/unity-shared/DashStyle.cpp b/unity-shared/DashStyle.cpp
index 4fbb32ff2..789659139 100644
--- a/unity-shared/DashStyle.cpp
+++ b/unity-shared/DashStyle.cpp
@@ -1359,10 +1359,6 @@ void Style::Impl::Text(cairo_t* cr,
PangoWeight weight;
switch (regular_text_weight_)
{
- case FontWeight::REGULAR:
- weight = PANGO_WEIGHT_NORMAL;
- break;
-
case FontWeight::LIGHT:
weight = PANGO_WEIGHT_LIGHT;
break;
@@ -1370,6 +1366,10 @@ void Style::Impl::Text(cairo_t* cr,
case FontWeight::BOLD:
weight = PANGO_WEIGHT_BOLD;
break;
+
+ case FontWeight::REGULAR:
+ default:
+ weight = PANGO_WEIGHT_NORMAL;
}
pango_font_description_set_weight(desc, weight);