summaryrefslogtreecommitdiff
path: root/source/fitz/harfbuzz.c
AgeCommit message (Collapse)Author
2017-11-09Bug 698353: Avoid having our API depend on DEBUG/NDEBUG.Robin Watts
Currently, our API uses static inlines for fz_lock and fz_unlock, the definitions for which depend on whether we build NDEBUG or not. This isn't ideal as it causes problems when people link a release binary with a debug lib (or vice versa). We really want to continue to use static inlines for the locking functions as used from MuPDF, as we hit them hard in the keep/drop functions. We therefore remove fz_lock/fz_unlock from the public API entirely. Accordingly, we move the fz_lock/fz_unlock static inlines into fitz-imp.h (an internal header), together with the fz_keep_.../fz_drop_... functions. We then have public fz_lock/fz_unlock functions for any external callers to use that are free of compilications. At the same time, to avoid another indirection, we change from holding the locking functions as a pointer to a struct to a struct itself.
2017-06-29Harfbuzz tweaks.Robin Watts
Avoid defining any functions/variables beginning with hb_ to avoid potential namespace clashes. Clarify language about why the Harfbuzz workarounds are needed.
2017-06-06Declare functions without arguments as taking void.Sebastian Rasmussen
2017-04-27Include required system headers.Tor Andersson
2017-01-17Fix typos.Sebastian Rasmussen
2016-09-14Add scripts to remove/replace 'static' from functions.Robin Watts
Getting a backtrace out with missing functions makes the backtrace much less useful. Some backtrace routines (such as that used by Memento on Android) are incapable of resolving static functions. We therefore provide 2 scripts (scripts/destatic.sh and scripts/restatic.sh) that respectively remove and replace the 'static' from function definitions. The scripts do not affect "static inline" or "static const" definitions, and they are are restricted to working in the source directory (excluding source/tools), thirdparty/mujs and the platform/{java,android} directories. The transformed source should NOT be checked in. To avoid problems with clashing symbols, some functions are renamed or tweaked slightly in this patch.
2016-07-08git stripspaceTor Andersson
2016-06-14Fix typos in various parts of the code.Sebastian Rasmussen
2016-06-08Move to using size_t for all mallocs.Robin Watts
This has knock on effects in the store. fix
2016-03-28Strengthen Harfbuzz code against outside use.Robin Watts
2016-01-29Force all harfbuzz allocations through our allocators.Robin Watts
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.