[pango/matthiasc/for-main: 2/2] build: Bump the harfbuzz req
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/matthiasc/for-main: 2/2] build: Bump the harfbuzz req
- Date: Wed, 17 Nov 2021 00:32:59 +0000 (UTC)
commit b3dd3103eff027344413af1b8572d906c79a6868
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Nov 16 19:31:20 2021 -0500
build: Bump the harfbuzz req
We are using the hb metrics api in more places
now, so just require 2.6.0 where it was introduced.
That version is almost 2 years old now, so that
is hopefully not too much of a burden.
meson.build | 2 +-
pango/pangofc-font.c | 12 ++++--------
2 files changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/meson.build b/meson.build
index 3caec030..37bcf6cb 100644
--- a/meson.build
+++ b/meson.build
@@ -228,7 +228,7 @@ pango_deps = []
glib_req_version = '>= 2.62'
fribidi_req_version = '>= 1.0.6'
libthai_req_version = '>= 0.1.9'
-harfbuzz_req_version = '>= 2.2.0'
+harfbuzz_req_version = '>= 2.6.0'
fontconfig_req_version = '>= 2.13.0'
xft_req_version = '>= 2.0.0'
cairo_req_version = '>= 1.12.10'
diff --git a/pango/pangofc-font.c b/pango/pangofc-font.c
index bcb14d7d..74503b91 100644
--- a/pango/pangofc-font.c
+++ b/pango/pangofc-font.c
@@ -331,10 +331,11 @@ pango_fc_font_get_coverage (PangoFont *font,
*/
static void
get_face_metrics (PangoFcFont *fcfont,
- PangoFontMetrics *metrics)
+ PangoFontMetrics *metrics)
{
hb_font_t *hb_font = pango_font_get_hb_font (PANGO_FONT (fcfont));
hb_font_extents_t extents;
+ hb_position_t position;
FcMatrix *fc_matrix;
gboolean have_transform = FALSE;
@@ -342,10 +343,10 @@ get_face_metrics (PangoFcFont *fcfont,
hb_font_get_extents_for_direction (hb_font, HB_DIRECTION_LTR, &extents);
if (FcPatternGetMatrix (fcfont->font_pattern,
- FC_MATRIX, 0, &fc_matrix) == FcResultMatch)
+ FC_MATRIX, 0, &fc_matrix) == FcResultMatch)
{
have_transform = (fc_matrix->xx != 1 || fc_matrix->xy != 0 ||
- fc_matrix->yx != 0 || fc_matrix->yy != 1);
+ fc_matrix->yx != 0 || fc_matrix->yy != 1);
}
if (have_transform)
@@ -366,10 +367,6 @@ get_face_metrics (PangoFcFont *fcfont,
metrics->strikethrough_thickness = PANGO_SCALE;
metrics->strikethrough_position = metrics->ascent / 2;
- /* FIXME: use the right hb version */
-#if HB_VERSION_ATLEAST(2,5,4)
- hb_position_t position;
-
if (hb_ot_metrics_get_position (hb_font, HB_OT_METRICS_TAG_UNDERLINE_SIZE, &position))
metrics->underline_thickness = position;
@@ -381,7 +378,6 @@ get_face_metrics (PangoFcFont *fcfont,
if (hb_ot_metrics_get_position (hb_font, HB_OT_METRICS_TAG_STRIKEOUT_OFFSET, &position))
metrics->strikethrough_position = position;
-#endif
}
PangoFontMetrics *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]