mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Added <soft> tag that takes up no space for alignment purposes;
used this tag for magic creature types; Added correct handling of Tribal sub types; Fixed sort_index use by spoiler export template git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@637 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -37,13 +37,15 @@ void FontTextElement::getCharInfo(RotatedDC& dc, double scale, vector<CharInfo>&
|
||||
for (size_t i = start ; i < end ; ++i) {
|
||||
Char c = content.GetChar(i - this->start);
|
||||
if (c == _('\n')) {
|
||||
out.push_back(CharInfo(RealSize(0, dc.GetCharHeight()), break_style));
|
||||
out.push_back(CharInfo(RealSize(0, dc.GetCharHeight()), break_style, draw_as == DRAW_ACTIVE));
|
||||
line_start = i + 1;
|
||||
prev_width = 0;
|
||||
} else {
|
||||
RealSize s = dc.GetTextExtent(content.substr(line_start - this->start, i - line_start + 1));
|
||||
out.push_back(CharInfo(RealSize(s.width - prev_width, s.height),
|
||||
c == _(' ') ? BREAK_SPACE : BREAK_MAYBE
|
||||
out.push_back(CharInfo(
|
||||
RealSize(s.width - prev_width, s.height),
|
||||
c == _(' ') ? BREAK_SPACE : BREAK_MAYBE,
|
||||
draw_as == DRAW_ACTIVE // from <soft> tag
|
||||
));
|
||||
prev_width = s.width;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user