summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-font.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2018-07-02 12:47:55 +0200
committerTor Andersson <tor.andersson@artifex.com>2018-07-05 15:32:35 +0200
commit2f698870f3ec77050694a9731a2a7ecc1b2962dd (patch)
tree893a8226130f17fb515de7224f2b41ac6a41fd19 /source/pdf/pdf-font.c
parent4af205af9c210d144dd9d5f9ff3fb277f61f5e19 (diff)
downloadmupdf-2f698870f3ec77050694a9731a2a7ecc1b2962dd.tar.xz
Purge unused functions.
Diffstat (limited to 'source/pdf/pdf-font.c')
-rw-r--r--source/pdf/pdf-font.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/source/pdf/pdf-font.c b/source/pdf/pdf-font.c
index b540f4ec..08ac77ad 100644
--- a/source/pdf/pdf-font.c
+++ b/source/pdf/pdf-font.c
@@ -1480,49 +1480,6 @@ pdf_print_font(fz_context *ctx, fz_output *out, pdf_font_desc *fontdesc)
/* Font creation */
-fz_rect *pdf_measure_text(fz_context *ctx, pdf_font_desc *fontdesc, unsigned char *buf, size_t len, fz_rect *acc)
-{
- size_t i;
- int w = 0;
-
- for (i = 0; i < len; i++)
- w += pdf_lookup_hmtx(ctx, fontdesc, buf[i]).w;
-
- acc->x0 = 0;
- acc->x1 = w / 1000.0f;
- acc->y0 = fontdesc->descent / 1000.0f;
- acc->y1 = fontdesc->ascent / 1000.0f;
-
- return acc;
-}
-
-float pdf_text_stride(fz_context *ctx, pdf_font_desc *fontdesc, float fontsize, unsigned char *buf, size_t len, float room, size_t *count)
-{
- pdf_hmtx h;
- size_t i = 0;
- float x = 0.0f;
-
- while(i < len)
- {
- float span;
-
- h = pdf_lookup_hmtx(ctx, fontdesc, buf[i]);
-
- span = h.w * fontsize / 1000.0f;
-
- if (x + span > room)
- break;
-
- x += span;
- i ++;
- }
-
- if (count)
- *count = i;
-
- return x;
-}
-
static pdf_obj*
pdf_add_font_file(fz_context *ctx, pdf_document *doc, fz_font *font)
{