From bececf00d7da9b2a200ab1e967c101e058b74dfa Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 4 Jan 2016 16:09:55 +0100 Subject: epub: Speed up font layout by caching freetype advance widths. --- include/mupdf/fitz/font.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/mupdf/fitz/font.h b/include/mupdf/fitz/font.h index 1e053470..21794d59 100644 --- a/include/mupdf/fitz/font.h +++ b/include/mupdf/fitz/font.h @@ -52,11 +52,15 @@ struct fz_font_s fz_rect bbox; /* font bbox is used only for t3 fonts */ + int glyph_count; + /* per glyph bounding box cache */ int use_glyph_bbox; - int bbox_count; fz_rect *bbox_table; + /* cached glyph metrics */ + float *advance_table; + /* substitute metrics */ int width_count; short width_default; /* in 1000 units */ -- cgit v1.2.3