Font name can now be scripted

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@291 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-04-22 22:37:20 +00:00
parent b0c6669384
commit e4500ce490
12 changed files with 100 additions and 74 deletions
+2 -2
View File
@@ -368,7 +368,7 @@ void TextViewer::prepareLines(RotatedDC& dc, const String& text, const TextStyle
if (style.always_symbol && style.symbol_font.valid()) {
lines[0].line_height = style.symbol_font.font->defaultSymbolSize(ctx, style.symbol_font.size).height;
} else {
dc.SetFont(style.font.font);
dc.SetFont(style.font, scale);
lines[0].line_height = dc.GetTextExtent(_(" ")).height;
}
}
@@ -378,7 +378,7 @@ void TextViewer::prepareLines(RotatedDC& dc, const String& text, const TextStyle
// HACK : fix empty first line before <line>, do this after align, so layout is not affected
if (lines.size() > 1 && lines[0].line_height == 0) {
dc.SetFont(style.font.font);
dc.SetFont(style.font, scale);
double h = dc.GetCharHeight();
lines[0].line_height = h;
lines[0].top -= h;