1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-22 13:00:08 +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 // the offset cause by a single ' ' char
double single_space_offset(void) const { double single_space_offset(void) const {
assert(font_info->em_size != 0); double offset = word_space + letter_space;
return word_space + letter_space + font_info->space_width / font_info->em_size * font_size; 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 // calculate em_size of this state
double em_size(void) const { double em_size(void) const {