diff --git a/src/HTMLRenderer/text.cc b/src/HTMLRenderer/text.cc
index aa1d022..6870648 100644
--- a/src/HTMLRenderer/text.cc
+++ b/src/HTMLRenderer/text.cc
@@ -78,10 +78,10 @@ void HTMLRenderer::drawString(GfxState * state, GooString * s)
* This is by standard
* however some PDF will use ' ' as a normal encoding slot
* such that it will be mapped to other unicodes
- * In that case, when sapce_as_offset is on, we will simply ignore that character...
+ * In that case, when space_as_offset is on, we will simply ignore that character...
*
* Checking mapped unicode may or may not work
- * There are always ugly PDF files with no usefull info at all.
+ * There are always ugly PDF files with no useful info at all.
*/
is_space = true;
++nSpaces;
@@ -113,11 +113,13 @@ void HTMLRenderer::drawString(GfxState * state, GooString * s)
html_text_page.get_cur_line()->append_unicodes(&uu, 1);
/*
* In PDF, word_space is appended if (n == 1 and *p = ' ')
- * but in HTML, word_space is appended if (uu == ' ')
+ * but in HTML, word_space is appended if (uu == ' ' || 0xa0)
*/
- int space_count = (is_space ? 1 : 0) - (uu == ' ' ? 1 : 0);
+ int space_count = (is_space ? 1 : 0) - ((uu == ' ' || uu == 0xa0) ? 1 : 0);
if(space_count != 0)
+ {
html_text_page.get_cur_line()->append_offset(cur_word_space * draw_text_scale * space_count);
+ }
}
}
diff --git a/src/util/ffw.c b/src/util/ffw.c
index 99fcb25..1be092c 100644
--- a/src/util/ffw.c
+++ b/src/util/ffw.c
@@ -262,6 +262,7 @@ void ffw_cidflatten(void)
/*
* There is no check if a glyph with the same unicode exists!
+ * TODO: let FontForge fill in the standard glyph name <- or maybe this might cause collision?
*/
void ffw_add_empty_char(int32_t unicode, int width)
{