diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2018-07-02 12:47:55 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2018-07-05 15:32:35 +0200 |
commit | 2f698870f3ec77050694a9731a2a7ecc1b2962dd (patch) | |
tree | 893a8226130f17fb515de7224f2b41ac6a41fd19 | |
parent | 4af205af9c210d144dd9d5f9ff3fb277f61f5e19 (diff) | |
download | mupdf-2f698870f3ec77050694a9731a2a7ecc1b2962dd.tar.xz |
Purge unused functions.
-rw-r--r-- | include/mupdf/pdf/font.h | 3 | ||||
-rw-r--r-- | source/pdf/pdf-font.c | 43 |
2 files changed, 0 insertions, 46 deletions
diff --git a/include/mupdf/pdf/font.h b/include/mupdf/pdf/font.h index 373b2b1b..b0f0cdb7 100644 --- a/include/mupdf/pdf/font.h +++ b/include/mupdf/pdf/font.h @@ -125,9 +125,6 @@ void pdf_drop_font(fz_context *ctx, pdf_font_desc *font); void pdf_print_font(fz_context *ctx, fz_output *out, pdf_font_desc *fontdesc); -fz_rect *pdf_measure_text(fz_context *ctx, pdf_font_desc *fontdesc, unsigned char *buf, size_t len, fz_rect *rect); -float pdf_text_stride(fz_context *ctx, pdf_font_desc *fontdesc, float fontsize, unsigned char *buf, size_t len, float room, size_t *count); - void pdf_run_glyph(fz_context *ctx, pdf_document *doc, pdf_obj *resources, fz_buffer *contents, fz_device *dev, fz_matrix ctm, void *gstate, int nested_depth, fz_default_colorspaces *default_cs); pdf_obj *pdf_add_simple_font(fz_context *ctx, pdf_document *doc, fz_font *font, int encoding); 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) { |