summaryrefslogtreecommitdiff
path: root/pango/pango-attributes.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-11-11 21:44:56 -0500
committerMatthias Clasen <mclasen@redhat.com>2021-11-18 13:58:15 -0500
commit2aead7a8e8828de6afef96611661997a52ca6739 (patch)
treedc1c796d9c95f7784648eddcc08b26bc39a762e1 /pango/pango-attributes.c
parent2f2cb72672c7f74e2648594819b7cde95ca0ed1d (diff)
downloadpango-2aead7a8e8828de6afef96611661997a52ca6739.tar.gz
Add layout serialization api
Add api to serialize PangoLayout, for the benefit of testing and debugging. Currently, this uses json, but that is an implementation detail. Some tests included.
Diffstat (limited to 'pango/pango-attributes.c')
-rw-r--r--pango/pango-attributes.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c
index 13468963..cfaf9b17 100644
--- a/pango/pango-attributes.c
+++ b/pango/pango-attributes.c
@@ -2802,7 +2802,7 @@ pango_attr_list_from_string (const char *text)
p = endp + strspn (endp, " ");
- endp = (char *)strpbrk (p, " ");
+ endp = (char *)p + strcspn (p, " ");
attr_type = get_attr_type_by_nick (p, endp - p);
p = endp + strspn (endp, " ");
@@ -2929,8 +2929,7 @@ pango_attr_list_from_string (const char *text)
break;
case PANGO_ATTR_SHAPE:
- endp = (char *)strpbrk (p, ",\n");
- p = endp + strspn (endp, " ");
+ endp = (char *)p + strcspn (p, ",\n");
continue; /* FIXME */
case PANGO_ATTR_SCALE: