diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2013-11-30 22:24:43 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2013-11-30 22:24:43 +0100 |
commit | e59bbf399ea046b6d410a7e9660d3e79ac431865 (patch) | |
tree | d1a41e3226bd3b778a518cf43755df7a94c51b35 | |
parent | 2a2a8ce66691f1ba310298945527d56fbd813ff8 (diff) | |
parent | 96b7acf51236dd54a7f34935b0c63876bc03a8ff (diff) |
merge
-rw-r--r-- | dw/textblock.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc index 6a75dc96..21aaa9dd 100644 --- a/dw/textblock.cc +++ b/dw/textblock.cc @@ -1620,8 +1620,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; @@ -1661,10 +1659,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); } } |