diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-04-05 21:38:32 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-04-06 00:06:45 +0200 |
commit | 750950784512ee3022ae0e65ce3608f04dadbae2 (patch) | |
tree | a6cae5d437050289e3935cb96855fe08980b9593 | |
parent | 791dd8c29c612965a0b5b5d8b923b8bbb12cbc10 (diff) | |
download | mupdf-750950784512ee3022ae0e65ce3608f04dadbae2.tar.xz |
Split encoded ligatures (as from PDF) properly in text extraction.
-rw-r--r-- | source/fitz/stext-device.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/source/fitz/stext-device.c b/source/fitz/stext-device.c index 01debad4..35a6568a 100644 --- a/source/fitz/stext-device.c +++ b/source/fitz/stext-device.c @@ -715,31 +715,31 @@ fz_add_stext_char(fz_context *ctx, fz_stext_device *dev, fz_stext_style *style, case -1: /* ignore when one unicode character maps to multiple glyphs */ break; case 0xFB00: /* ff */ - fz_add_stext_char_imp(ctx, dev, style, 'f', 0, trm, adv/2, wmode); - fz_add_stext_char_imp(ctx, dev, style, 'f', 0, trm, adv/2, wmode); + fz_add_stext_char_imp(ctx, dev, style, 'f', glyph, trm, adv, wmode); + fz_add_stext_char_imp(ctx, dev, style, 'f', -1, trm, 0, wmode); break; case 0xFB01: /* fi */ - fz_add_stext_char_imp(ctx, dev, style, 'f', 0, trm, adv/2, wmode); - fz_add_stext_char_imp(ctx, dev, style, 'i', 0, trm, adv/2, wmode); + fz_add_stext_char_imp(ctx, dev, style, 'f', glyph, trm, adv, wmode); + fz_add_stext_char_imp(ctx, dev, style, 'i', -1, trm, 0, wmode); break; case 0xFB02: /* fl */ - fz_add_stext_char_imp(ctx, dev, style, 'f', 0, trm, adv/2, wmode); - fz_add_stext_char_imp(ctx, dev, style, 'l', 0, trm, adv/2, wmode); + fz_add_stext_char_imp(ctx, dev, style, 'f', glyph, trm, adv, wmode); + fz_add_stext_char_imp(ctx, dev, style, 'l', -1, trm, 0, wmode); break; case 0xFB03: /* ffi */ - fz_add_stext_char_imp(ctx, dev, style, 'f', 0, trm, adv/3, wmode); - fz_add_stext_char_imp(ctx, dev, style, 'f', 0, trm, adv/3, wmode); - fz_add_stext_char_imp(ctx, dev, style, 'i', 0, trm, adv/3, wmode); + fz_add_stext_char_imp(ctx, dev, style, 'f', glyph, trm, adv, wmode); + fz_add_stext_char_imp(ctx, dev, style, 'f', -1, trm, 0, wmode); + fz_add_stext_char_imp(ctx, dev, style, 'i', -1, trm, 0, wmode); break; case 0xFB04: /* ffl */ - fz_add_stext_char_imp(ctx, dev, style, 'f', 0, trm, adv/3, wmode); - fz_add_stext_char_imp(ctx, dev, style, 'f', 0, trm, adv/3, wmode); - fz_add_stext_char_imp(ctx, dev, style, 'l', 0, trm, adv/3, wmode); + fz_add_stext_char_imp(ctx, dev, style, 'f', glyph, trm, adv, wmode); + fz_add_stext_char_imp(ctx, dev, style, 'f', -1, trm, 0, wmode); + fz_add_stext_char_imp(ctx, dev, style, 'l', -1, trm, 0, wmode); break; case 0xFB05: /* long st */ case 0xFB06: /* st */ - fz_add_stext_char_imp(ctx, dev, style, 's', 0, trm, adv/2, wmode); - fz_add_stext_char_imp(ctx, dev, style, 't', 0, trm, adv/2, wmode); + fz_add_stext_char_imp(ctx, dev, style, 's', glyph, trm, adv, wmode); + fz_add_stext_char_imp(ctx, dev, style, 't', -1, trm, 0, wmode); break; default: fz_add_stext_char_imp(ctx, dev, style, c, glyph, trm, adv, wmode); |