summaryrefslogtreecommitdiff
path: root/source/fitz
diff options
context:
space:
mode:
authorSimon Bünzli <zeniko@gmail.com>2013-11-11 22:42:06 +0100
committerSimon Bünzli <zeniko@gmail.com>2013-11-27 21:03:05 +0100
commit4ab737fa41a1c925319921f663e017c2c1a17e54 (patch)
tree302cee8407cf884bde65283fd8766afe73f65b62 /source/fitz
parent827a710ffda3a28a302f22233e45e18697bbfa26 (diff)
downloadmupdf-4ab737fa41a1c925319921f663e017c2c1a17e54.tar.xz
track font path in fz_font
ft_file was removed in a2c945506ea2a2b58edbde84124094c6b4f69eac even though it might still be needed by downstream consumers (such as SumatraPDF) for allowing devices to load fonts again when a font has been loaded by fz_new_font_from_file which doesn't maintain a buffer.
Diffstat (limited to 'source/fitz')
-rw-r--r--source/fitz/font.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/fitz/font.c b/source/fitz/font.c
index 2e2cd53b..83fedc6a 100644
--- a/source/fitz/font.c
+++ b/source/fitz/font.c
@@ -33,7 +33,7 @@ fz_new_font(fz_context *ctx, const char *name, int use_glyph_bbox, int glyph_cou
font->ft_hint = 0;
font->ft_buffer = NULL;
- font->ft_size = 0;
+ font->ft_filepath = NULL;
font->t3matrix = fz_identity;
font->t3resources = NULL;
@@ -152,6 +152,7 @@ fz_drop_font(fz_context *ctx, fz_font *font)
}
fz_drop_buffer(ctx, font->ft_buffer);
+ fz_free(ctx, font->ft_filepath);
fz_free(ctx, font->bbox_table);
fz_free(ctx, font->width_table);
fz_free(ctx, font);
@@ -342,6 +343,7 @@ fz_new_font_from_file(fz_context *ctx, const char *name, const char *path, int i
(float) face->bbox.yMin / face->units_per_EM,
(float) face->bbox.xMax / face->units_per_EM,
(float) face->bbox.yMax / face->units_per_EM);
+ font->ft_filepath = fz_strdup(ctx, path);
return font;
}