From 773131e104d13718aaa3d47e56c50c75f04e8ee6 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Thu, 28 Jan 2016 19:28:10 +0000 Subject: Force all harfbuzz allocations through our allocators. Because of a shortcoming in harfbuzz, we can't easily force all its allocations through our allocators. We fudge it, with the addition of some macros to change malloc/free/calloc into hb_malloc/hb_free/hb_calloc. To prevent thread safety issues, we use our freetype lock around calls to harfbuzz. We stash the current context in a static var. --- include/mupdf/fitz/font.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/mupdf/fitz/font.h b/include/mupdf/fitz/font.h index 2371b485..47866f9e 100644 --- a/include/mupdf/fitz/font.h +++ b/include/mupdf/fitz/font.h @@ -117,4 +117,7 @@ int fz_encode_character_with_fallback(fz_context *ctx, fz_font *font, int unicod void fz_print_font(fz_context *ctx, fz_output *out, fz_font *font); +void hb_lock(fz_context *ctx); +void hb_unlock(fz_context *ctx); + #endif -- cgit v1.2.3