summaryrefslogtreecommitdiff
path: root/fitz/dev_text.c
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2010-06-24 01:03:47 +0200
committerTor Andersson <tor@ghostscript.com>2010-06-24 01:03:47 +0200
commit551c0cf14e572fa7192704d6c20d96145f715efc (patch)
tree26b2c7f9152f7b4f8863e7dd2dc15d2f16376dac /fitz/dev_text.c
parent5705cd9b6fc26ee72256b82b25be91ce871735a0 (diff)
downloadmupdf-551c0cf14e572fa7192704d6c20d96145f715efc.tar.xz
More tweaks to space insertion.
Diffstat (limited to 'fitz/dev_text.c')
-rw-r--r--fitz/dev_text.c8
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;