diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2021-03-23 07:45:57 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2021-04-06 12:55:18 +0100 |
commit | 70af64433f491ee28e8b4ff19ebf413d45960155 (patch) | |
tree | 46dd5971011d619377ed233469f33c33f303d79e /src/3rdparty/harfbuzz-ng/src/hb-graphite2.cc | |
parent | 29450dfa283bc08f1999ac6dfc5c4956cc9af044 (diff) |
Update to Harfbuzz 2.8.0
This updates Harfbuzz to the latest version and also
adds an import script to help with this work in the
future.
Task-number: QTBUG-90217
Pick-to: 6.1
Change-Id: I23eae7b7bbbd5001df9873e4784a0c4213de5508
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/3rdparty/harfbuzz-ng/src/hb-graphite2.cc')
-rw-r--r-- | src/3rdparty/harfbuzz-ng/src/hb-graphite2.cc | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/src/3rdparty/harfbuzz-ng/src/hb-graphite2.cc b/src/3rdparty/harfbuzz-ng/src/hb-graphite2.cc index f0f2f8c736..9dafe654c8 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-graphite2.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-graphite2.cc @@ -45,7 +45,11 @@ * @short_description: Graphite2 integration * @include: hb-graphite2.h * - * Functions for using HarfBuzz with the Graphite2 fonts. + * Functions for using HarfBuzz with fonts that include Graphite features. + * + * For Graphite features to work, you must be sure that HarfBuzz was compiled + * with the `graphite2` shaping engine enabled. Currently, the default is to + * not enable `graphite2` shaping. **/ @@ -152,7 +156,15 @@ _hb_graphite2_shaper_face_data_destroy (hb_graphite2_face_data_t *data) free (data); } -/* +/** + * hb_graphite2_face_get_gr_face: + * @face: @hb_face_t to query + * + * Fetches the Graphite2 gr_face corresponding to the specified + * #hb_face_t face object. + * + * Return value: the gr_face found + * * Since: 0.9.10 */ gr_face * @@ -183,6 +195,11 @@ _hb_graphite2_shaper_font_data_destroy (hb_graphite2_font_data_t *data HB_UNUSED #ifndef HB_DISABLE_DEPRECATED /** * hb_graphite2_font_get_gr_font: + * @font: An #hb_font_t + * + * Always returns %NULL. Use hb_graphite2_face_get_gr_face() instead. + * + * Return value: (nullable): Graphite2 font associated with @font. * * Since: 0.9.10 * Deprecated: 1.4.2 @@ -272,7 +289,7 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan HB_UNUSED, return true; } - buffer->ensure (glyph_count); + (void) buffer->ensure (glyph_count); scratch = buffer->get_scratch_buffer (&scratch_size); while ((DIV_CEIL (sizeof (hb_graphite2_cluster_t) * buffer->len, sizeof (*scratch)) + DIV_CEIL (sizeof (hb_codepoint_t) * glyph_count, sizeof (*scratch))) > scratch_size) @@ -376,7 +393,7 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan HB_UNUSED, buffer->len = glyph_count; /* Positioning. */ - unsigned int currclus = (unsigned int) -1; + unsigned int currclus = UINT_MAX; const hb_glyph_info_t *info = buffer->info; hb_glyph_position_t *pPos = hb_buffer_get_glyph_positions (buffer, nullptr); if (!HB_DIRECTION_IS_BACKWARD(buffer->props.direction)) |