[pango/pango2: 28/135] test-layout: port to simple-para
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/pango2: 28/135] test-layout: port to simple-para
- Date: Fri, 18 Feb 2022 20:10:59 +0000 (UTC)
commit 37a8be50eca076c81f77ecd8465f8728400d8486
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jan 18 21:13:48 2022 -0500
test-layout: port to simple-para
tests/test-layout.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/tests/test-layout.c b/tests/test-layout.c
index ca98523d..fab6501f 100644
--- a/tests/test-layout.c
+++ b/tests/test-layout.c
@@ -45,7 +45,7 @@ test_layout (gconstpointer d)
gsize length;
GBytes *orig;
PangoContext *context;
- PangoLayout *layout;
+ PangoSimpleLayout *layout;
if (!PANGO_FC_IS_FONT_MAP (pango_cairo_font_map_get_default ()))
{
@@ -69,10 +69,11 @@ test_layout (gconstpointer d)
orig = g_bytes_new_take (contents, length);
context = pango_font_map_create_context (pango_cairo_font_map_get_default ());
- layout = pango_layout_deserialize (context, orig, PANGO_LAYOUT_DESERIALIZE_CONTEXT, &error);
+ layout = pango_simple_layout_deserialize (context, orig, PANGO_SIMPLE_LAYOUT_DESERIALIZE_CONTEXT, &error);
g_assert_no_error (error);
- bytes = pango_layout_serialize (layout, PANGO_LAYOUT_SERIALIZE_CONTEXT | PANGO_LAYOUT_SERIALIZE_OUTPUT);
+ bytes = pango_simple_layout_serialize (layout, PANGO_SIMPLE_LAYOUT_SERIALIZE_CONTEXT |
+ PANGO_SIMPLE_LAYOUT_SERIALIZE_OUTPUT);
g_object_unref (layout);
g_object_unref (context);
@@ -175,16 +176,17 @@ main (int argc, char *argv[])
GBytes *orig;
GBytes *bytes;
PangoContext *context;
- PangoLayout *layout;
+ PangoSimpleLayout *layout;
g_file_get_contents (argv[1], &contents, &length, &error);
g_assert_no_error (error);
orig = g_bytes_new_take (contents, length);
context = pango_font_map_create_context (pango_cairo_font_map_get_default ());
- layout = pango_layout_deserialize (context, orig, PANGO_LAYOUT_DESERIALIZE_CONTEXT, &error);
+ layout = pango_simple_layout_deserialize (context, orig, PANGO_SIMPLE_LAYOUT_DESERIALIZE_CONTEXT,
&error);
g_assert_no_error (error);
- bytes = pango_layout_serialize (layout, PANGO_LAYOUT_SERIALIZE_CONTEXT |
PANGO_LAYOUT_SERIALIZE_OUTPUT);
+ bytes = pango_simple_layout_serialize (layout, PANGO_SIMPLE_LAYOUT_SERIALIZE_CONTEXT |
+ PANGO_SIMPLE_LAYOUT_SERIALIZE_OUTPUT);
g_object_unref (layout);
g_object_unref (context);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]