diff options
-rw-r--r-- | fitz/dev_text.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fitz/dev_text.c b/fitz/dev_text.c index fc00272a..42f9393a 100644 --- a/fitz/dev_text.c +++ b/fitz/dev_text.c @@ -1,7 +1,7 @@ #include "fitz.h" #define LINEDIST 0.9f -#define SPACEDIST 0.1f +#define SPACEDIST 0.2f #include <ft2build.h> #include FT_FREETYPE_H @@ -247,7 +247,7 @@ fz_textextractspan(fz_textspan **last, fz_text *text, fz_matrix ctm, fz_point *p int multi; int i, err; - if (text->len == 0) + if (text->len == 0) return; if (font->ftface) @@ -275,7 +275,7 @@ fz_textextractspan(fz_textspan **last, fz_text *text, fz_matrix ctm, fz_point *p tm.e = 0; tm.f = 0; trm = fz_concat(tm, ctm); - dir = fz_transformvector(trm, dir); + dir = fz_transformvector(trm, dir); dist = sqrtf(dir.x * dir.x + dir.y * dir.y); ndir.x = dir.x / dist; ndir.y = dir.y / dist; @@ -320,7 +320,7 @@ fz_textextractspan(fz_textspan **last, fz_text *text, fz_matrix ctm, fz_point *p } else if (fabsf(dot) > 0.95f && dist > size * SPACEDIST) { - if ((*last)->len != 0 || (*last)->text[(*last)->len - 1].c != ' ') + if ((*last)->len > 0 && (*last)->text[(*last)->len - 1].c != ' ') { fz_rect spacerect; spacerect.x0 = -0.2f; |