[pango/line-separator-font] itemize: Don't change font for line separator



commit 318c83d584bc5c9c66e7786b922cb934a256cea7
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Jul 8 16:29:26 2019 -0400

    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.

 pango/pango-context.c | 4 ++++
 1 file changed, 4 insertions(+)
---
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)))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]