diff options
Diffstat (limited to 'src/gui/text/qharfbuzzng.cpp')
-rw-r--r-- | src/gui/text/qharfbuzzng.cpp | 40 |
1 files changed, 15 insertions, 25 deletions
diff --git a/src/gui/text/qharfbuzzng.cpp b/src/gui/text/qharfbuzzng.cpp index 6aca660205..36bd81c76b 100644 --- a/src/gui/text/qharfbuzzng.cpp +++ b/src/gui/text/qharfbuzzng.cpp @@ -202,7 +202,21 @@ static const hb_script_t _qtscript_to_hbscript[] = { HB_SCRIPT_HATRAN, HB_SCRIPT_MULTANI, HB_SCRIPT_OLD_HUNGARIAN, - HB_SCRIPT_SIGNWRITING + HB_SCRIPT_SIGNWRITING, + + // Unicode 9.0 additions + HB_SCRIPT_ADLAM, + HB_SCRIPT_BHAIKSUKI, + HB_SCRIPT_MARCHEN, + HB_SCRIPT_NEWA, + HB_SCRIPT_OSAGE, + HB_SCRIPT_TANGUT, + + // Unicode 10.0 additions + HB_SCRIPT_MASARAM_GONDI, + HB_SCRIPT_NUSHU, + HB_SCRIPT_SOYOMBO, + HB_SCRIPT_ZANABAZAR_SQUARE }; Q_STATIC_ASSERT(QChar::ScriptCount == sizeof(_qtscript_to_hbscript) / sizeof(_qtscript_to_hbscript[0])); @@ -422,7 +436,6 @@ hb_unicode_funcs_t *hb_qt_get_unicode_funcs() // Font routines -#if HB_VERSION_ATLEAST(1, 1, 3) static hb_bool_t _hb_qt_get_font_h_extents(hb_font_t * /*font*/, void *font_data, hb_font_extents_t *metrics, @@ -437,9 +450,7 @@ _hb_qt_get_font_h_extents(hb_font_t * /*font*/, void *font_data, return true; } -#endif -#if HB_VERSION_ATLEAST(1, 2, 3) static hb_bool_t _hb_qt_font_get_nominal_glyph(hb_font_t * /*font*/, void *font_data, hb_codepoint_t unicode, @@ -453,7 +464,6 @@ _hb_qt_font_get_nominal_glyph(hb_font_t * /*font*/, void *font_data, return *glyph != 0; } -#endif static hb_bool_t _hb_qt_font_get_variation_glyph(hb_font_t * /*font*/, void *font_data, @@ -490,17 +500,6 @@ _hb_qt_font_get_glyph_h_advance(hb_font_t *font, void *font_data, return advance.value(); } -#if !HB_VERSION_ATLEAST(1, 1, 2) -static hb_bool_t -_hb_qt_font_get_glyph_h_origin(hb_font_t * /*font*/, void * /*font_data*/, - hb_codepoint_t /*glyph*/, - hb_position_t * /*x*/, hb_position_t * /*y*/, - void * /*user_data*/) -{ - return true; // we always work in the horizontal coordinates -} -#endif - static hb_position_t _hb_qt_font_get_glyph_h_kerning(hb_font_t *font, void *font_data, hb_codepoint_t first_glyph, hb_codepoint_t second_glyph, @@ -581,19 +580,10 @@ struct _hb_qt_font_funcs_t { { funcs = hb_font_funcs_create(); -#if HB_VERSION_ATLEAST(1, 1, 3) hb_font_funcs_set_font_h_extents_func(funcs, _hb_qt_get_font_h_extents, NULL, NULL); -#endif -#if HB_VERSION_ATLEAST(1, 2, 3) hb_font_funcs_set_nominal_glyph_func(funcs, _hb_qt_font_get_nominal_glyph, NULL, NULL); hb_font_funcs_set_variation_glyph_func(funcs, _hb_qt_font_get_variation_glyph, NULL, NULL); -#else - hb_font_funcs_set_glyph_func(funcs, _hb_qt_font_get_variation_glyph, NULL, NULL); -#endif hb_font_funcs_set_glyph_h_advance_func(funcs, _hb_qt_font_get_glyph_h_advance, NULL, NULL); -#if !HB_VERSION_ATLEAST(1, 1, 2) - hb_font_funcs_set_glyph_h_origin_func(funcs, _hb_qt_font_get_glyph_h_origin, NULL, NULL); -#endif hb_font_funcs_set_glyph_h_kerning_func(funcs, _hb_qt_font_get_glyph_h_kerning, NULL, NULL); hb_font_funcs_set_glyph_extents_func(funcs, _hb_qt_font_get_glyph_extents, NULL, NULL); hb_font_funcs_set_glyph_contour_point_func(funcs, _hb_qt_font_get_glyph_contour_point, NULL, NULL); |