[config] Replace HAVE_FALLBACK with HB_NO_FALLBACK_SHAPE

This disables fallback shaper in tiny builds.  Projects that don't
use our build system and want to disable fallback shaper (eg. Firefox)
should define HB_NO_FALLBACK_SHAPE now.

Part of https://github.com/harfbuzz/harfbuzz/issues/1652
This commit is contained in:
Behdad Esfahbod 2019-06-17 20:29:29 -07:00
parent 3a9394635f
commit 23768a99e0
7 changed files with 6 additions and 19 deletions

View File

@ -88,8 +88,6 @@ include_directories(AFTER
${PROJECT_BINARY_DIR}/src
)
add_definitions(-DHAVE_FALLBACK)
# We need PYTHON_EXECUTABLE to be set for running the tests...
include (FindPythonInterp)

View File

@ -136,14 +136,6 @@ AM_CONDITIONAL(HAVE_PTHREAD, $have_pthread)
dnl ==========================================================================
have_fallback=true
if $have_fallback; then
AC_DEFINE(HAVE_FALLBACK, 1, [Have simple TrueType Layout backend])
fi
AM_CONDITIONAL(HAVE_FALLBACK, $have_fallback)
dnl ===========================================================================
AC_ARG_WITH(glib,
[AS_HELP_STRING([--with-glib=@<:@yes/no/auto@:>@],
[Use glib @<:@default=auto@:>@])],,

View File

@ -28,10 +28,6 @@ HBSOURCES = $(HB_BASE_sources)
HBSOURCES += $(HB_BASE_RAGEL_GENERATED_sources)
HBHEADERS = $(HB_BASE_headers)
if HAVE_FALLBACK
HBSOURCES += $(HB_FALLBACK_sources)
endif
if HAVE_PTHREAD
HBCFLAGS += $(PTHREAD_CFLAGS)
HBNONPCLIBS += $(PTHREAD_LIBS)

View File

@ -36,6 +36,7 @@ HB_BASE_sources = \
hb-dispatch.hh \
hb-face.cc \
hb-face.hh \
hb-fallback-shape.cc \
hb-font.cc \
hb-font.hh \
hb-iter.hh \
@ -200,10 +201,6 @@ HB_BASE_headers = \
hb.h \
$(NULL)
HB_FALLBACK_sources = \
hb-fallback-shape.cc \
$(NULL)
# Optional Sources and Headers with external deps
HB_FT_sources = hb-ft.cc

View File

@ -99,6 +99,7 @@
#endif
#ifdef HB_NO_LEGACY
#define HB_NO_FALLBACK_SHAPE
#define HB_NO_OT_LAYOUT_BLACKLIST
#define HB_NO_OT_SHAPE_FALLBACK
#endif

View File

@ -26,6 +26,7 @@
#include "hb-shaper-impl.hh"
#ifndef HB_NO_FALLBACK_SHAPE
/*
* shaper face data
@ -120,3 +121,5 @@ _hb_fallback_shape (hb_shape_plan_t *shape_plan HB_UNUSED,
return true;
}
#endif

View File

@ -47,6 +47,6 @@ HB_SHAPER_IMPLEMENT (directwrite)
HB_SHAPER_IMPLEMENT (coretext)
#endif
#ifdef HAVE_FALLBACK
#ifndef HB_NO_FALLBACK_SHAPE
HB_SHAPER_IMPLEMENT (fallback) /* <--- This should be last. */
#endif