From 145311e59e6f0b47e65fc465c66990ecf0a6f39c Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Thu, 30 May 2019 03:42:54 +0000 Subject: Do not use hb-icu if HarfBuzz version is 2.5.0 or newer. (Khaled). git-svn-id: svn://tug.org/texlive/trunk@51269 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/xetexdir/ChangeLog | 5 +++++ Build/source/texk/web2c/xetexdir/XeTeXLayoutInterface.cpp | 15 +++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) (limited to 'Build') diff --git a/Build/source/texk/web2c/xetexdir/ChangeLog b/Build/source/texk/web2c/xetexdir/ChangeLog index 0dc1913e6d3..c347291d65f 100644 --- a/Build/source/texk/web2c/xetexdir/ChangeLog +++ b/Build/source/texk/web2c/xetexdir/ChangeLog @@ -1,3 +1,8 @@ +2019-05-30 Khaled Hosny + + * XeTeXLayoutInterface.cpp: Do not use hb-icu if HarfBuzz + version is 2.5.0 or newer. + 2019-01-03 Akira Kakuto * NEWS, xetex_version.h, xetex.web: Sync with the upstream. diff --git a/Build/source/texk/web2c/xetexdir/XeTeXLayoutInterface.cpp b/Build/source/texk/web2c/xetexdir/XeTeXLayoutInterface.cpp index 5b2d2b53933..dc24f3a93ff 100644 --- a/Build/source/texk/web2c/xetexdir/XeTeXLayoutInterface.cpp +++ b/Build/source/texk/web2c/xetexdir/XeTeXLayoutInterface.cpp @@ -39,8 +39,11 @@ authorization from the copyright holders. #include #include +#include #include +#if !HB_VERSION_ATLEAST(2,5,0) #include +#endif #include #include "XeTeX_web.h" @@ -661,6 +664,7 @@ deleteLayoutEngine(XeTeXLayoutEngine engine) free(engine->shaper); } +#if !HB_VERSION_ATLEAST(2,5,0) static unsigned int _decompose_compat(hb_unicode_funcs_t* ufuncs, hb_codepoint_t u, @@ -677,8 +681,7 @@ _get_unicode_funcs(void) hb_unicode_funcs_set_decompose_compatibility_func(ufuncs, _decompose_compat, NULL, NULL); return ufuncs; } - -static hb_unicode_funcs_t* hbUnicodeFuncs = NULL; +#endif int layoutChars(XeTeXLayoutEngine engine, uint16_t chars[], int32_t offset, int32_t count, int32_t max, @@ -699,11 +702,15 @@ layoutChars(XeTeXLayoutEngine engine, uint16_t chars[], int32_t offset, int32_t script = hb_ot_tag_to_script (engine->script); + hb_buffer_reset(engine->hbBuffer); + +#if !HB_VERSION_ATLEAST(2,5,0) + static hb_unicode_funcs_t* hbUnicodeFuncs = NULL; if (hbUnicodeFuncs == NULL) hbUnicodeFuncs = _get_unicode_funcs(); - - hb_buffer_reset(engine->hbBuffer); hb_buffer_set_unicode_funcs(engine->hbBuffer, hbUnicodeFuncs); +#endif + hb_buffer_add_utf16(engine->hbBuffer, chars, max, offset, count); hb_buffer_set_direction(engine->hbBuffer, direction); hb_buffer_set_script(engine->hbBuffer, script); -- cgit v1.2.3