From 334e5565c688c0a2a0172c9007e76dffaca238d8 Mon Sep 17 00:00:00 2001 From: Oneric Date: Sat, 13 Mar 2021 02:20:18 +0100 Subject: Add WRAP_UNICODE feature Setting this feature allows breaking lines according to the Unicode Line Breaking Algorithm and is incompatible with VSFilter. This is useful for non-ASS renderers utilising libass, especially for languages typically not using ASCII-spaces to separate words, but also to correctly break on punctuation even in languages that do. It does not allow breaking words apart, so line overflow might still occur. For this to work a new optional dependency on libunibrak is added. We assume FriBidi's and libunibreak's utf32/glyph type match. This is based on an earlier patch by GitHub user siikamiika. --- configure.ac | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 42b5a81c..543a44e1 100644 --- a/configure.ac +++ b/configure.ac @@ -30,6 +30,8 @@ AC_ARG_ENABLE([directwrite], AS_HELP_STRING([--disable-directwrite], [disable DirectWrite support (Windows only) @<:@default=check@:>@])) AC_ARG_ENABLE([coretext], AS_HELP_STRING([--disable-coretext], [disable CoreText support (OSX only) @<:@default=check@:>@])) +AC_ARG_ENABLE([libunibreak], AS_HELP_STRING([--disable-libunibreak], + [disable libunibreak support @<:@default=check@:>@])) AC_ARG_ENABLE([require-system-font-provider], AS_HELP_STRING([--disable-require-system-font-provider], [allow compilation even if no system font provider was found @<:@default=enabled:>@])) AC_ARG_ENABLE([asm], AS_HELP_STRING([--disable-asm], @@ -104,6 +106,19 @@ AS_IF([test "x$enable_test" = xyes || test "x$enable_compare" = xyes], [ ]) ]) +AS_IF([test "x$enable_libunibreak" != xno], [ + PKG_CHECK_MODULES([LIBUNIBREAK], [libunibreak >= 1.1], [ + pkg_requires="libunibreak >= 1.1, ${pkg_requires}" + CFLAGS="$CFLAGS $LIBUNIBREAK_CFLAGS" + LIBS="$LIBS $LIBUNIBREAK_LIBS" + AC_DEFINE(CONFIG_UNIBREAK, 1, [found libunibreak via pkg-config]) + ], [ + AS_IF([test "x$enable_libunibreak" = xyes], [ + AC_MSG_ERROR([libunibreak support was requested, but it was not found.]) + ]) + ]) +]) + ## Check for system font providers ### Fontconfig AS_IF([test "x$enable_fontconfig" != xno], [ -- cgit v1.2.3