Merge branch 'bump-pango' into 'master'

Bump the pango dependency

See merge request GNOME/gtk!3871
This commit is contained in:
Matthias Clasen
2021-08-22 19:57:21 +00:00
8 changed files with 3 additions and 21 deletions

View File

@@ -40,7 +40,7 @@ export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
# https://gitlab.gnome.org/GNOME/gtk/-/issues/2243
# https://gitlab.gnome.org/GNOME/gtk/-/issues/3002
if ! pkg-config --atleast-version=2.65.0 glib-2.0; then
if ! pkg-config --atleast-version=2.66.0 glib-2.0; then
git clone https://gitlab.gnome.org/GNOME/glib.git _glib
meson setup _glib_build _glib
meson compile -C _glib_build
@@ -48,7 +48,7 @@ if ! pkg-config --atleast-version=2.65.0 glib-2.0; then
fi
pkg-config --modversion glib-2.0
if ! pkg-config --atleast-version=1.47.0 pango; then
if ! pkg-config --atleast-version=1.49.0 pango; then
git clone https://gitlab.gnome.org/GNOME/pango.git _pango
meson setup _pango_build _pango
meson compile -C _pango_build

View File

@@ -255,14 +255,12 @@ insert_tags_for_attributes (GtkTextBuffer *buffer,
INT_ATTR (insert_hyphens);
break;
#if PANGO_VERSION_CHECK(1,49,0)
case PANGO_ATTR_LINE_HEIGHT:
FLOAT_ATTR (line_height);
break;
case PANGO_ATTR_ABSOLUTE_LINE_HEIGHT:
break;
#endif
case PANGO_ATTR_SHAPE:
case PANGO_ATTR_ABSOLUTE_SIZE:
@@ -272,10 +270,8 @@ insert_tags_for_attributes (GtkTextBuffer *buffer,
case PANGO_ATTR_BACKGROUND_ALPHA:
break;
#if PANGO_VERSION_CHECK(1,49,0)
case PANGO_ATTR_TEXT_TRANSFORM:
break;
#endif
case PANGO_ATTR_INVALID:
default:

View File

@@ -486,7 +486,6 @@ gtk_css_style_get_pango_attributes (GtkCssStyle *style)
attrs = add_pango_attr (attrs, pango_attr_letter_spacing_new (letter_spacing * PANGO_SCALE));
}
#if PANGO_VERSION_CHECK(1, 49, 0)
/* line-height */
{
double height = gtk_css_line_height_value_get (style->font->line_height);
@@ -498,7 +497,6 @@ gtk_css_style_get_pango_attributes (GtkCssStyle *style)
attrs = add_pango_attr (attrs, pango_attr_line_height_new (height));
}
}
#endif
/* OpenType features */

View File

@@ -249,7 +249,6 @@ attribute_from_text (GtkBuilder *builder,
color->blue * 65535);
}
break;
#if PANGO_VERSION_CHECK(1, 49, 0)
case PANGO_ATTR_LINE_HEIGHT:
if (gtk_builder_value_from_string_type (builder, G_TYPE_DOUBLE, value, &val, error))
attribute = pango_attr_line_height_new (g_value_get_double (&val));
@@ -262,7 +261,6 @@ attribute_from_text (GtkBuilder *builder,
if (gtk_builder_value_from_string_type (builder, PANGO_TYPE_TEXT_TRANSFORM, value, &val, error))
attribute = pango_attr_text_transform_new (g_value_get_enum (&val));
break;
#endif
case PANGO_ATTR_INVALID:
default:
break;

View File

@@ -4689,14 +4689,12 @@ insert_tags_for_attributes (GtkTextBuffer *buffer,
INT_ATTR (letter_spacing);
break;
#if PANGO_VERSION_CHECK(1, 49, 0)
case PANGO_ATTR_LINE_HEIGHT:
FLOAT_ATTR (line_height);
break;
case PANGO_ATTR_ABSOLUTE_LINE_HEIGHT:
break;
#endif
case PANGO_ATTR_FONT_FEATURES:
STRING_ATTR (font_features);
@@ -4714,10 +4712,8 @@ insert_tags_for_attributes (GtkTextBuffer *buffer,
INT_ATTR (insert_hyphens);
break;
#if PANGO_VERSION_CHECK(1, 49, 0)
case PANGO_ATTR_TEXT_TRANSFORM:
break;
#endif
case PANGO_ATTR_SHAPE:
case PANGO_ATTR_ABSOLUTE_SIZE:

View File

@@ -1638,7 +1638,6 @@ add_text_attrs (GtkTextLayout *layout,
pango_attr_list_insert (attrs, attr);
}
#if PANGO_VERSION_CHECK(1, 49, 0)
if (style->line_height != 0.0)
{
if (style->line_height_is_absolute)
@@ -1650,7 +1649,6 @@ add_text_attrs (GtkTextLayout *layout,
pango_attr_list_insert (attrs, attr);
}
#endif
if (style->font_features)
{

View File

@@ -11,7 +11,7 @@ project('gtk', 'c',
license: 'LGPL-2.1-or-later')
glib_req = '>= 2.66.0'
pango_req = '>= 1.47.0' # keep this in sync with .gitlab-ci/test-msys.sh
pango_req = '>= 1.49.0' # keep this in sync with .gitlab-ci/test-msys.sh
fribidi_req = '>= 0.19.7'
cairo_req = '>= 1.14.0'
gdk_pixbuf_req = '>= 2.30.0'

View File

@@ -41,10 +41,8 @@ print_attribute (PangoAttribute *attr, GString *string)
case PANGO_ATTR_ALLOW_BREAKS:
case PANGO_ATTR_INSERT_HYPHENS:
case PANGO_ATTR_SHOW:
#if PANGO_VERSION_CHECK(1, 49, 0)
case PANGO_ATTR_ABSOLUTE_LINE_HEIGHT:
case PANGO_ATTR_TEXT_TRANSFORM:
#endif
g_string_append_printf (string, "%d", ((PangoAttrInt *)attr)->value);
break;
case PANGO_ATTR_FONT_DESC:
@@ -69,9 +67,7 @@ print_attribute (PangoAttribute *attr, GString *string)
g_string_append_printf (string, "shape");
break;
case PANGO_ATTR_SCALE:
#if PANGO_VERSION_CHECK(1, 49, 0)
case PANGO_ATTR_LINE_HEIGHT:
#endif
{
char val[20];