summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dw/textblock.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc
index cd301871..dec512d4 100644
--- a/dw/textblock.cc
+++ b/dw/textblock.cc
@@ -1447,8 +1447,6 @@ void Textblock::calcTextSize (const char *text, size_t len,
core::style::Style *style,
core::Requisition *size, bool isStart, bool isEnd)
{
- int requiredAscent, requiredDescent;
-
size->width = textWidth (text, 0, len, style, isStart, isEnd);
size->ascent = style->font->ascent;
size->descent = style->font->descent;
@@ -1488,10 +1486,10 @@ void Textblock::calcTextSize (const char *text, size_t len,
* potentially the line's height.
*/
if (style->valign == core::style::VALIGN_SUB) {
- requiredDescent = style->font->descent + style->font->ascent / 3;
+ int requiredDescent = style->font->descent + style->font->ascent / 3;
size->descent = misc::max (size->descent, requiredDescent);
} else if (style->valign == core::style::VALIGN_SUPER) {
- requiredAscent = style->font->ascent + style->font->ascent / 2;
+ int requiredAscent = style->font->ascent + style->font->ascent / 2;
size->ascent = misc::max (size->ascent, requiredAscent);
}
}