summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2013-05-06 11:08:29 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2013-05-06 17:22:31 +0200
commitbff8fa97e16f0f06fddc5545ea36c8bd2b18a580 (patch)
tree68f92f1622770a178a770f802ec8f6b4db3e1a3b
parentf0393d7ff69011a16b100541ef18e5090544e4a1 (diff)
Enable HarfBuzz by default
HarfBuzz integration should be functional now, so to give it more wider testing it is made now a required dependency on non-Windows non-Mac OSs. By default text layout is now done by HarfBuzz but ICU LayoutEngine is kept as a fallback and can be enabled with SAL_USE_ICULE env variable. After 4.1.x is branched, ICU LayoutEngine should be removed completely. Change-Id: I4fe3beeaf6092f33dd436906c11b83aeafdfbd5d
-rw-r--r--config_host/config_harfbuzz.h.in6
-rw-r--r--configure.ac9
-rw-r--r--vcl/generic/glyphs/gcach_layout.cxx15
3 files changed, 4 insertions, 26 deletions
diff --git a/config_host/config_harfbuzz.h.in b/config_host/config_harfbuzz.h.in
deleted file mode 100644
index b408f5234297..000000000000
--- a/config_host/config_harfbuzz.h.in
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef CONFIG_HARFBUZZ_H
-#define CONFIG_HARFBUZZ_H
-
-#define ENABLE_HARFBUZZ 0
-
-#endif
diff --git a/configure.ac b/configure.ac
index 75e26bd74fee..cda53d4c9ca3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -720,11 +720,6 @@ AC_ARG_ENABLE(graphite,
[Enables the compilation of Graphite smart font rendering.])
)
-AC_ARG_ENABLE(harfbuzz,
- AS_HELP_STRING([--enable-harfbuzz],
- [Determines whether to use HarfBuzz text layout engine.])
-)
-
AC_ARG_ENABLE(fetch-external,
AS_HELP_STRING([--disable-fetch-external],
[Disables fetching external tarballs from web sources.])
@@ -8482,10 +8477,9 @@ dnl ===================================================================
dnl HarfBuzz
dnl ===================================================================
AC_MSG_CHECKING([whether to enable HarfBuzz support])
-if test "$_os" != "WINNT" -a "$_os" != "Darwin" && test "$enable_harfbuzz" = "" -o "$enable_harfbuzz" != "no"; then
+if test "$_os" != "WINNT" -a "$_os" != "Darwin"; then
AC_MSG_RESULT([yes])
ENABLE_HARFBUZZ="TRUE"
- AC_DEFINE(ENABLE_HARFBUZZ)
libo_CHECK_SYSTEM_MODULE([harfbuzz],[HARFBUZZ],[harfbuzz >= 0.9.10])
else
AC_MSG_RESULT([no])
@@ -11978,7 +11972,6 @@ AC_CONFIG_HEADERS([config_host/config_clang.h])
AC_CONFIG_HEADERS([config_host/config_features.h])
AC_CONFIG_HEADERS([config_host/config_global.h])
AC_CONFIG_HEADERS([config_host/config_graphite.h])
-AC_CONFIG_HEADERS([config_host/config_harfbuzz.h])
AC_CONFIG_HEADERS([config_host/config_lgpl.h])
AC_CONFIG_HEADERS([config_host/config_kde4.h])
AC_CONFIG_HEADERS([config_host/config_mingw.h])
diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx
index 935a0e5180d7..7df803f1315c 100644
--- a/vcl/generic/glyphs/gcach_layout.cxx
+++ b/vcl/generic/glyphs/gcach_layout.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <config_harfbuzz.h>
#include <gcach_ftyp.hxx>
#include <sallayout.hxx>
#include <salgdi.hxx>
@@ -31,10 +30,9 @@
#include <sal/alloca.h>
#include <rtl/instance.hxx>
-#if ENABLE_HARFBUZZ
#include <harfbuzz/hb-icu.h>
#include <harfbuzz/hb-ot.h>
-#endif
+
#include <layout/LayoutEngine.h>
#include <layout/LEFontInstance.h>
#include <layout/LELanguages.h>
@@ -50,10 +48,7 @@
ServerFontLayout::ServerFontLayout( ServerFont& rFont )
: mrServerFont( rFont )
{
- bUseHarfBuzz = false;
-#if ENABLE_HARFBUZZ
- bUseHarfBuzz = (getenv("SAL_USE_HARFBUZZ") != NULL);
-#endif
+ bUseHarfBuzz = (getenv("SAL_USE_ICULE") == NULL);
}
void ServerFontLayout::DrawText( SalGraphics& rSalGraphics ) const
@@ -208,7 +203,6 @@ static bool needNextCode(sal_Unicode cChar)
return lcl_CharIsJoiner(cChar) || U16_IS_TRAIL(cChar);
}
-#if ENABLE_HARFBUZZ
static hb_blob_t *getFontTable(hb_face_t* /*face*/, hb_tag_t nTableTag, void* pUserData)
{
char pTagName[5];
@@ -537,7 +531,6 @@ bool HbLayoutEngine::layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs)
return true;
}
-#endif // ENABLE_HARFBUZZ
// =======================================================================
// bridge to ICU LayoutEngine
@@ -1214,12 +1207,10 @@ ServerFontLayoutEngine* ServerFont::GetLayoutEngine(bool bUseHarfBuzz)
{
// find best layout engine for font, platform, script and language
if (!mpLayoutEngine) {
-#if ENABLE_HARFBUZZ
if (bUseHarfBuzz)
mpLayoutEngine = new HbLayoutEngine(*this);
else
-#endif
- mpLayoutEngine = new IcuLayoutEngine(*this);
+ mpLayoutEngine = new IcuLayoutEngine(*this);
}
return mpLayoutEngine;
}