Minor
This commit is contained in:
parent
9bfe22af61
commit
227d85e138
|
@ -107,7 +107,7 @@ _hb_atomic_ptr_impl_cmplexch (const void **P, const void *O_, const void *N)
|
|||
|
||||
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);
|
||||
|
|
|
@ -63,7 +63,7 @@ extern HB_INTERNAL hb_atomic_int_t _hb_options;
|
|||
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. */
|
||||
|
|
|
@ -1347,7 +1347,7 @@ hb_font_create (hb_face_t *face)
|
|||
{
|
||||
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
|
||||
|
|
|
@ -183,13 +183,13 @@ hb_ot_get_glyph_extents (hb_font_t *font,
|
|||
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
|
||||
|
|
|
@ -138,7 +138,7 @@ bool
|
|||
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!
|
||||
|
@ -384,7 +384,7 @@ bool
|
|||
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,
|
||||
|
@ -412,7 +412,7 @@ bool
|
|||
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;
|
||||
|
|
|
@ -60,7 +60,7 @@ struct NameRecord
|
|||
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
|
||||
|
|
|
@ -383,7 +383,7 @@ arabic_fallback_shape (const hb_ot_shape_plan_t *plan,
|
|||
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
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ compose_hebrew (const hb_ot_shape_normalize_context_t *c,
|
|||
|
||||
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
|
||||
|
||||
|
|
|
@ -218,7 +218,7 @@ do_thai_pua_shaping (const hb_ot_shape_plan_t *plan HB_UNUSED,
|
|||
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
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
|
|||
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)
|
||||
|
|
|
@ -166,7 +166,7 @@ _hb_ot_shape_fallback_mark_position_recategorize_marks (const hb_ot_shape_plan_t
|
|||
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
|
||||
|
||||
|
@ -438,7 +438,7 @@ _hb_ot_shape_fallback_mark_position (const hb_ot_shape_plan_t *plan,
|
|||
hb_buffer_t *buffer,
|
||||
bool adjust_offsets_when_zeroing)
|
||||
{
|
||||
#if defined(HB_NO_OT_SHAPE_FALLBACK)
|
||||
#ifdef HB_NO_OT_SHAPE_FALLBACK
|
||||
return;
|
||||
#endif
|
||||
|
||||
|
@ -481,7 +481,7 @@ _hb_ot_shape_fallback_kern (const hb_ot_shape_plan_t *plan,
|
|||
hb_font_t *font,
|
||||
hb_buffer_t *buffer)
|
||||
{
|
||||
#if defined(HB_NO_OT_SHAPE_FALLBACK)
|
||||
#ifdef HB_NO_OT_SHAPE_FALLBACK
|
||||
return;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -206,7 +206,7 @@ _subset_table (hb_subset_plan_t *plan,
|
|||
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;
|
||||
|
@ -247,7 +247,7 @@ _should_drop_table (hb_subset_plan_t *plan, hb_tag_t tag)
|
|||
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;
|
||||
|
|
|
@ -26,12 +26,12 @@
|
|||
|
||||
#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
|
||||
|
|
10
src/hb.hh
10
src/hb.hh
|
@ -30,7 +30,7 @@
|
|||
#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__)
|
||||
|
@ -203,7 +203,7 @@ extern "C" void hb_free_impl(void *ptr);
|
|||
#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
|
||||
|
@ -315,7 +315,7 @@ extern "C" int hb_memalign_impl(void **memptr, size_t alignment, size_t size);
|
|||
# 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")))
|
||||
|
@ -445,12 +445,12 @@ static_assert ((sizeof (hb_var_int_t) == 4), "");
|
|||
*
|
||||
* 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
|
||||
|
|
Loading…
Reference in New Issue