Make sure we set the height of the string if it doesn't contain

any spaces where we could break the line.

Patch from Jon Burgess <jburgess777@googlemail.com>.
This commit is contained in:
Tom Hughes 2008-07-27 11:07:12 +00:00
parent 779a0e67b2
commit 5432c8a7d0

View File

@ -275,7 +275,9 @@ namespace mapnik
}
}
line_width += word_width;
line_height = line_height > word_height ? line_height : word_height;
string_width = string_width > line_width ? string_width : line_width;
string_height += line_height;
line_breaks.push_back(p.info.num_characters() + 1);
line_widths.push_back(line_width);
}