summaryrefslogtreecommitdiff
path: root/pango/pango-context.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-07-08 16:29:26 -0400
committerMatthias Clasen <mclasen@redhat.com>2019-07-08 17:02:09 -0400
commit318c83d584bc5c9c66e7786b922cb934a256cea7 (patch)
tree6cb783f8a99bd42a365b080f21ec173f3b925ff3 /pango/pango-context.c
parenta3229b9c026141d6df70bd6f2f58102dac3678bc (diff)
downloadpango-318c83d584bc5c9c66e7786b922cb934a256cea7.tar.gz
itemize: Don't change font for line separator
If we render this (in single-paragraph mode), we draw a hex box, so changing font just for the line separator is never useful, and in fact, counterproductive in cases where the font has a (typically empty) glyph for it. This fixes the [LS] or [PS] hex boxes not showing up in single-paragraph mode depending on font fallback.
Diffstat (limited to 'pango/pango-context.c')
-rw-r--r--pango/pango-context.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pango/pango-context.c b/pango/pango-context.c
index 83fdc9a6..f187a92f 100644
--- a/pango/pango-context.c
+++ b/pango/pango-context.c
@@ -1493,11 +1493,15 @@ itemize_state_process_run (ItemizeState *state)
*
* We don't want to change fonts just for variation selectors.
* See bug #781123.
+ *
+ * Finally, don't change fonts for line or paragraph separators.
*/
type = g_unichar_type (wc);
if (G_UNLIKELY (type == G_UNICODE_CONTROL ||
type == G_UNICODE_FORMAT ||
type == G_UNICODE_SURROGATE ||
+ type == G_UNICODE_LINE_SEPARATOR ||
+ type == G_UNICODE_PARAGRAPH_SEPARATOR ||
(type == G_UNICODE_SPACE_SEPARATOR && wc != 0x1680u /* OGHAM SPACE MARK */) ||
(wc >= 0xfe00u && wc <= 0xfe0fu) ||
(wc >= 0xe0100u && wc <= 0xe01efu)))