From 2e71986b998fa7aa52654a1063844c7915e6bfb2 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 29 Mar 2021 00:11:10 -0400 Subject: Slightly speed up line breaking Make a bit more use of our types. --- pango/break.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pango') diff --git a/pango/break.c b/pango/break.c index fadf01d0..6b8e5c01 100644 --- a/pango/break.c +++ b/pango/break.c @@ -362,12 +362,15 @@ pango_default_break (const gchar *text, case G_UNICODE_PARAGRAPH_SEPARATOR: attrs[i].is_white = TRUE; break; - default: + case G_UNICODE_CONTROL: if (wc == '\t' || wc == '\n' || wc == '\r' || wc == '\f') attrs[i].is_white = TRUE; else attrs[i].is_white = FALSE; break; + default: + attrs[i].is_white = FALSE; + break; } /* Just few spaces have variable width. So explicitly mark them. -- cgit v1.2.1