Fix paragraph separators cutting off titles (#6337)

Pango has the option to render paragraph separators and other special
characters as glyphs, which fixes the cutting off described in #5391.

https://docs.gtk.org/Pango/method.Layout.set_single_paragraph_mode.html
This commit is contained in:
Garrett Marcinak 2025-07-09 02:56:55 -04:00 committed by GitHub
parent cfa4cf16be
commit 9fc24064e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View File

@ -95,6 +95,7 @@ static void draw_text_pango(const char *text, size_t text_len,
pango_layout_set_width(layout, max_width * PANGO_SCALE);
pango_layout_set_wrap(layout, PANGO_WRAP_CHAR);
pango_layout_set_ellipsize(layout, PANGO_ELLIPSIZE_END);
pango_layout_set_single_paragraph_mode(layout, true);
if (pango_markup) {
pango_layout_set_markup(layout, text, text_len);

View File

@ -0,0 +1 @@
fix paragraph separators cutting off titles