static inline void _hb_memory_barrier ()
{
-#if !defined(MemoryBarrier)
+#ifndef MemoryBarrier
/* MinGW has a convoluted history of supporting MemoryBarrier. */
LONG dummy = 0;
InterlockedExchange (&dummy, 1);
static inline hb_options_t
hb_options ()
{
-#if defined(HB_NO_GETENV)
+#ifdef HB_NO_GETENV
return hb_options_t ();
#endif
/* Make a local copy, so we can access bitfield threadsafely. */
{
hb_font_t *font = _hb_font_create (face);
-#if !defined(HB_NO_OT_FONT)
+#ifndef HB_NO_OT_FONT
/* Install our in-house, very lightweight, funcs. */
hb_ot_font_set_funcs (font);
#endif
bool ret = ot_face->sbix->get_extents (font, glyph, extents);
if (!ret)
ret = ot_face->glyf->get_extents (glyph, extents);
-#if !defined(HB_NO_OT_FONT_CFF)
+#ifndef HB_NO_OT_FONT_CFF
if (!ret)
ret = ot_face->cff1->get_extents (glyph, extents);
if (!ret)
ret = ot_face->cff2->get_extents (font, glyph, extents);
#endif
-#if !defined(HB_NO_OT_FONT_BITMAP)
+#ifndef HB_NO_OT_FONT_BITMAP
if (!ret)
ret = ot_face->CBDT->get_extents (font, glyph, extents);
#endif
OT::GDEF::is_blacklisted (hb_blob_t *blob,
hb_face_t *face) const
{
-#if defined(HB_NO_OT_LAYOUT_BLACKLIST)
+#ifdef HB_NO_OT_LAYOUT_BLACKLIST
return false;
#endif
/* The ugly business of blacklisting individual fonts' tables happen here!
OT::GSUB::is_blacklisted (hb_blob_t *blob HB_UNUSED,
hb_face_t *face) const
{
-#if defined(HB_NO_OT_LAYOUT_BLACKLIST)
+#ifdef HB_NO_OT_LAYOUT_BLACKLIST
return false;
#endif
/* Mac OS X prefers morx over GSUB. It also ships with various Indic fonts,
OT::GPOS::is_blacklisted (hb_blob_t *blob HB_UNUSED,
hb_face_t *face HB_UNUSED) const
{
-#if defined(HB_NO_OT_LAYOUT_BLACKLIST)
+#ifdef HB_NO_OT_LAYOUT_BLACKLIST
return false;
#endif
return false;
if (p == 1)
return _hb_ot_name_language_for_mac_code (l);
-#if !defined(HB_NO_NAME_TABLE_AAT)
+#ifndef HB_NO_NAME_TABLE_AAT
if (p == 0)
return _hb_aat_language_get (face, l);
#endif
hb_font_t *font,
hb_buffer_t *buffer)
{
-#if defined(HB_NO_OT_SHAPE_COMPLEX_ARABIC_FALLBACK)
+#ifdef HB_NO_OT_SHAPE_COMPLEX_ARABIC_FALLBACK
return;
#endif
bool found = (bool) c->unicode->compose (a, b, ab);
-#if defined(HB_NO_OT_SHAPE_COMPLEX_HEBREW_FALLBACK)
+#ifdef HB_NO_OT_SHAPE_COMPLEX_HEBREW_FALLBACK
return found;
#endif
hb_buffer_t *buffer,
hb_font_t *font)
{
-#if defined(HB_NO_OT_SHAPE_COMPLEX_THAI_FALLBACK)
+#ifdef HB_NO_OT_SHAPE_COMPLEX_THAI_FALLBACK
return;
#endif
hb_buffer_t *buffer,
hb_font_t *font HB_UNUSED)
{
-#if defined(HB_NO_OT_SHAPE_COMPLEX_VOWEL_CONSTRAINTS)
+#ifdef HB_NO_OT_SHAPE_COMPLEX_VOWEL_CONSTRAINTS
return;
#endif
if (buffer->flags & HB_BUFFER_FLAG_DO_NOT_INSERT_DOTTED_CIRCLE)
hb_font_t *font HB_UNUSED,
hb_buffer_t *buffer)
{
-#if defined(HB_NO_OT_SHAPE_FALLBACK)
+#ifdef HB_NO_OT_SHAPE_FALLBACK
return;
#endif
hb_buffer_t *buffer,
bool adjust_offsets_when_zeroing)
{
-#if defined(HB_NO_OT_SHAPE_FALLBACK)
+#ifdef HB_NO_OT_SHAPE_FALLBACK
return;
#endif
hb_font_t *font,
hb_buffer_t *buffer)
{
-#if defined(HB_NO_OT_SHAPE_FALLBACK)
+#ifdef HB_NO_OT_SHAPE_FALLBACK
return;
#endif
result = _subset<const OT::VORG> (plan);
break;
-#if !defined(HB_NO_SUBSET_LAYOUT)
+#ifndef HB_NO_SUBSET_LAYOUT
case HB_OT_TAG_GDEF:
result = _subset2<const OT::GDEF> (plan);
break;
case HB_OT_TAG_GDEF:
case HB_OT_TAG_GPOS:
case HB_OT_TAG_GSUB:
-#if defined(HB_NO_SUBSET_LAYOUT)
+#ifdef HB_NO_SUBSET_LAYOUT
return true;
#endif
return plan->drop_layout;
#include "hb.hh"
-#if defined(HB_ATOMIC_INT_NIL)
+#ifdef HB_ATOMIC_INT_NIL
#error "Could not find any system to define atomic_int macros, library WILL NOT be thread-safe"
#error "Check hb-atomic.hh for possible resolutions."
#endif
-#if defined(HB_MUTEX_IMPL_NIL)
+#ifdef HB_MUTEX_IMPL_NIL
#error "Could not find any system to define mutex macros, library WILL NOT be thread-safe"
#error "Check hb-mutex.hh for possible resolutions."
#endif
#define HB_HH
#ifndef HB_NO_PRAGMA_GCC_DIAGNOSTIC
-#if defined(_MSC_VER)
+#ifdef _MSC_VER
#pragma warning( disable: 4068 ) /* Unknown pragma */
#endif
#if defined(__GNUC__) || defined(__clang__)
#define realloc hb_realloc_impl
#define free hb_free_impl
-#if defined(hb_memalign_impl)
+#ifdef hb_memalign_impl
extern "C" int hb_memalign_impl(void **memptr, size_t alignment, size_t size);
#define posix_memalign hb_memalign_impl
#else
# define HB_FALLTHROUGH /* FALLTHROUGH */
#endif
-#if defined(__clang__)
+#ifdef __clang__
/* Disable certain sanitizer errors. */
/* https://github.com/harfbuzz/harfbuzz/issues/1247 */
#define HB_NO_SANITIZE_SIGNED_INTEGER_OVERFLOW __attribute__((no_sanitize("signed-integer-overflow")))
*
* https://bugs.chromium.org/p/chromium/issues/detail?id=860184
*/
-#if !defined(HB_VECTOR_SIZE)
+#ifndef HB_VECTOR_SIZE
# define HB_VECTOR_SIZE 0
#endif
/* The `vector_size' attribute was introduced in gcc 3.1. */
-#if !defined(HB_VECTOR_SIZE)
+#ifndef HB_VECTOR_SIZE
# if defined( __GNUC__ ) && ( __GNUC__ >= 4 )
# define HB_VECTOR_SIZE 128
# else