X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fpdf%2FInfoOutputDev.cc;h=5990d4ffbf05d6950f62082be4a2e6efe0891856;hb=ad99af72e37b3c3ab2a84d544a12c0ac11fa72f0;hp=214814f5dfbb7b8c785519a124478c454c21c87c;hpb=2f0ee9b97abeeb1a74722ccdfaa0ffa6b5427cd0;p=swftools.git diff --git a/lib/pdf/InfoOutputDev.cc b/lib/pdf/InfoOutputDev.cc index 214814f..5990d4f 100644 --- a/lib/pdf/InfoOutputDev.cc +++ b/lib/pdf/InfoOutputDev.cc @@ -119,14 +119,9 @@ static int findSpace(gfxfont_t*font) gfxglyph_t*g = &font->glyphs[t]; if(GLYPH_IS_SPACE(g)) { if(g->unicode == 32) return t; - if(first_space<0) - first_space = t; } } - if(font->num_glyphs>32 && GLYPH_IS_SPACE(&font->glyphs[32])) { - return 32; - } - return first_space; + return -1; } static int addSpace(gfxfont_t*font) @@ -176,8 +171,6 @@ static gfxfont_t* createGfxFont(FontInfo*src) gfxglyph_t*glyph = &font->glyphs[font->num_glyphs]; src->glyphs[t]->glyphid = font->num_glyphs; glyph->unicode = src->glyphs[t]->unicode; - if(glyph->unicode >= font->max_unicode) - font->max_unicode = glyph->unicode+1; gfxdrawer_t drawer; gfxdrawer_target_gfxline(&drawer); int s; @@ -227,8 +220,6 @@ static gfxfont_t* createGfxFont(FontInfo*src) } } - gfxfont_fix_unicode(font); - int kerning_size = 0; for(t=0;tnum_glyphs;t++) { dict_t* d = src->kerning[t]; @@ -290,6 +281,7 @@ gfxfont_t* FontInfo::getGfxFont() this->space_char = addSpace(this->gfxfont); msg(" Appending space char to font %s, position %d, width %f", this->gfxfont->id, this->space_char, this->gfxfont->glyphs[this->space_char].advance); } + gfxfont_fix_unicode(this->gfxfont); } return this->gfxfont; }