aboutsummaryrefslogtreecommitdiff
path: root/dw/textblock.cc
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2009-02-11 20:34:28 -0300
committercorvid <corvid@lavabit.com>2009-02-11 20:34:28 -0300
commitf386ab131e3cae8b98d67ccf1fb5542536ef540e (patch)
tree1e482564e5a5a39b971d6c6b6f6dbc9b117de439 /dw/textblock.cc
parent17e082cef393a2ce528eae5fe63f9e249c888e73 (diff)
Tweak for e28cf4b71832 (set SUB to 1/3)
Diffstat (limited to 'dw/textblock.cc')
-rw-r--r--dw/textblock.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc
index f7722559..4f70702a 100644
--- a/dw/textblock.cc
+++ b/dw/textblock.cc
@@ -1282,12 +1282,12 @@ void Textblock::drawLine (Line *line, core::View *view, core::Rectangle *area)
/* Adjust the text baseline if the word is <SUP>-ed or <SUB>-ed. */
if (word->style->valign == core::style::VALIGN_SUB)
- diff = word->size.ascent / 2;
+ diff = word->style->font->ascent / 3;
else if (word->style->valign == core::style::VALIGN_SUPER) {
diff -= word->style->font->ascent / 2;
}
if (word->spaceStyle->valign == core::style::VALIGN_SUB)
- spaceDiff = word->spaceStyle->font->ascent / 2;
+ spaceDiff = word->spaceStyle->font->ascent / 3;
else if (word->spaceStyle->valign == core::style::VALIGN_SUPER) {
spaceDiff -= word->spaceStyle->font->ascent / 2;
}
@@ -1603,7 +1603,7 @@ void Textblock::calcTextSize (const char *text, core::style::Style *style,
* potentially the line's height.
*/
if (style->valign == core::style::VALIGN_SUB)
- size->descent += (size->ascent / 2);
+ size->descent += (size->ascent / 3);
else if (style->valign == core::style::VALIGN_SUPER)
size->ascent += (size->ascent / 2);
}