diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2013-08-22 21:25:44 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2013-08-22 21:32:46 +0200 |
commit | 1f9d1e15634b1ef1dea37dc00c7bacb4f97996d6 (patch) | |
tree | 15d700c194b589cc7183ac01acfeb2d6cfb79a58 /vcl | |
parent | 4fe9ef81aa83403bd3b7df555ccbd96cbdfd7c2d (diff) |
fdo#66715: Avoid compatibility decomposition with HarfBuzz
Change-Id: Ibbf5720baf7fb507e66515104115d58597258b1d
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/generic/glyphs/gcach_layout.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx index c76bda68393a..cc22bad9915e 100644 --- a/vcl/generic/glyphs/gcach_layout.cxx +++ b/vcl/generic/glyphs/gcach_layout.cxx @@ -313,6 +313,22 @@ static hb_font_funcs_t* getFontFuncs(void) return funcs; } +// Disabled Unicode compatibility decomposition, see fdo#66715 +static unsigned int unicodeDecomposeCompatibility(hb_unicode_funcs_t* /*ufuncs*/, + hb_codepoint_t /*u*/, + hb_codepoint_t* /*decomposed*/, + void* /*user_data*/) +{ + return 0; +} + +static hb_unicode_funcs_t* getUnicodeFuncs(void) +{ + static hb_unicode_funcs_t* ufuncs = hb_unicode_funcs_create(hb_icu_get_unicode_funcs()); + hb_unicode_funcs_set_decompose_compatibility_func(ufuncs, unicodeDecomposeCompatibility, NULL, NULL); + return ufuncs; +} + class HbLayoutEngine : public ServerFontLayoutEngine { private: @@ -399,6 +415,7 @@ bool HbLayoutEngine::layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs) OString sLanguage = OUStringToOString(aLangTag.getLanguage(), RTL_TEXTENCODING_UTF8); hb_buffer_t *pHbBuffer = hb_buffer_create(); + hb_buffer_set_unicode_funcs(pHbBuffer, getUnicodeFuncs()); hb_buffer_set_direction(pHbBuffer, bRightToLeft ? HB_DIRECTION_RTL: HB_DIRECTION_LTR); hb_buffer_set_script(pHbBuffer, hb_icu_script_to_script(eScriptCode)); hb_buffer_set_language(pHbBuffer, hb_language_from_string(sLanguage.getStr(), -1)); |