diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2015-10-09 11:07:42 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2015-12-11 13:02:33 +0100 |
commit | fa0bffa57e7e2164f0201b0f2fdc984d475674ae (patch) | |
tree | ad6a7d7bc8641e390552ba8c49fdba351de00f82 /include | |
parent | e3275837d5738c5092b2e452829919e31ad553e5 (diff) | |
download | mupdf-fa0bffa57e7e2164f0201b0f2fdc984d475674ae.tar.xz |
Keep spans of multiple fonts and sizes in one fz_text object.
Diffstat (limited to 'include')
-rw-r--r-- | include/mupdf/fitz/text.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/include/mupdf/fitz/text.h b/include/mupdf/fitz/text.h index 303731bc..01b4667f 100644 --- a/include/mupdf/fitz/text.h +++ b/include/mupdf/fitz/text.h @@ -19,6 +19,7 @@ */ typedef struct fz_text_s fz_text; +typedef struct fz_text_span_s fz_text_span; typedef struct fz_text_item_s fz_text_item; struct fz_text_item_s @@ -28,21 +29,27 @@ struct fz_text_item_s int ucs; /* -1 for one ucs to many gid mappings */ }; -struct fz_text_s +struct fz_text_span_s { - int refs; fz_font *font; fz_matrix trm; int wmode; int len, cap; fz_text_item *items; + fz_text_span *next; +}; + +struct fz_text_s +{ + int refs; + fz_text_span *head, *tail; }; -fz_text *fz_new_text(fz_context *ctx, fz_font *face, const fz_matrix *trm, int wmode); +fz_text *fz_new_text(fz_context *ctx); fz_text *fz_keep_text(fz_context *ctx, fz_text *text); void fz_drop_text(fz_context *ctx, fz_text *text); -void fz_add_text(fz_context *ctx, fz_text *text, int gid, int ucs, float x, float y); +void fz_add_text(fz_context *ctx, fz_text *text, fz_font *font, int wmode, const fz_matrix *trm, int gid, int ucs); fz_rect *fz_bound_text(fz_context *ctx, fz_text *text, const fz_stroke_state *stroke, const fz_matrix *ctm, fz_rect *r); #endif |