summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-07-27 07:23:42 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-07-30 07:58:16 -0400
commit898b09609ab8fd9628dd2fdc62da816ccf1e880b (patch)
tree28763dc9d86662517d8892053605eee9fd4d4bc8
parent6247bc1d16d672927c6b4e2ddb150813ff516eeb (diff)
downloadpango-898b09609ab8fd9628dd2fdc62da816ccf1e880b.tar.gz
break: Cosmetics
-rw-r--r--pango/break.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/pango/break.c b/pango/break.c
index ddef75f6..b26a0651 100644
--- a/pango/break.c
+++ b/pango/break.c
@@ -358,24 +358,26 @@ pango_default_break (const gchar *text,
switch (type)
{
case G_UNICODE_SPACE_SEPARATOR:
+ /* Just few spaces have variable width. So explicitly mark them.
+ */
+ attrs[i].is_white = TRUE;
+ attrs[i].is_expandable_space = (wc == ' ' || wc == 0x00A0);
+ break;
case G_UNICODE_LINE_SEPARATOR:
case G_UNICODE_PARAGRAPH_SEPARATOR:
attrs[i].is_white = TRUE;
+ attrs[i].is_expandable_space = FALSE;
break;
case G_UNICODE_CONTROL:
- if (wc == '\t' || wc == '\n' || wc == '\r' || wc == '\f')
- attrs[i].is_white = TRUE;
- else
- attrs[i].is_white = FALSE;
+ attrs[i].is_white = (wc == '\t' || wc == '\n' || wc == '\r' || wc == '\f');
+ attrs[i].is_expandable_space = FALSE;
break;
default:
attrs[i].is_white = FALSE;
+ attrs[i].is_expandable_space = FALSE;
break;
}
- /* Just few spaces have variable width. So explicitly mark them.
- */
- attrs[i].is_expandable_space = (0x0020 == wc || 0x00A0 == wc);
is_Extended_Pictographic =
_pango_Is_Emoji_Extended_Pictographic (wc);