1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-07-02 16:25:41 +00:00

check if em size is 0

This commit is contained in:
Lu Wang 2013-07-01 12:01:29 +08:00
parent 50d261867a
commit 1fc7027395

View File

@ -34,8 +34,10 @@ struct HTMLTextState
// the offset cause by a single ' ' char
double single_space_offset(void) const {
assert(font_info->em_size != 0);
return word_space + letter_space + font_info->space_width / font_info->em_size * font_size;
double offset = word_space + letter_space;
if(font_info->em_size != 0)
offset += font_info->space_width / font_info->em_size * font_size;
return offset;
}
// calculate em_size of this state
double em_size(void) const {