Skip to content

Commit

Permalink
Bump the minimum required version for harfbuzz to 1.6.0
Browse files Browse the repository at this point in the history
This is the first version that supports Unicode 10.0.0, which
we now require for Qt.

Change-Id: Iff3cb757eb7d97dace5649262c337a4ed1145199
Reviewed-by: Lars Knoll <[email protected]>
  • Loading branch information
laknoll committed Dec 30, 2017
1 parent 809200a commit f3f4f95
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 25 deletions.
2 changes: 1 addition & 1 deletion src/gui/configure.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
"test": {
"include": "harfbuzz/hb.h",
"tail": [
"#if !HB_VERSION_ATLEAST(0, 9, 42)",
"#if !HB_VERSION_ATLEAST(1, 6, 0)",
"# error This version of harfbuzz is too old.",
"#endif"
],
Expand Down
24 changes: 0 additions & 24 deletions src/gui/text/qharfbuzzng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,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,
Expand All @@ -437,9 +436,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,
Expand All @@ -453,7 +450,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,
Expand Down Expand Up @@ -490,17 +486,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,
Expand Down Expand Up @@ -581,19 +566,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);
Expand Down

0 comments on commit f3f4f95

Please sign in to comment.