From fdbce78cf8350770d7ec16ee410941a56a180965 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Fri, 26 Sep 2025 21:16:55 -0300 Subject: [PATCH] UICodeEditor: Better line ending glyph fallback. --- src/eepp/ui/uicodeeditor.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/eepp/ui/uicodeeditor.cpp b/src/eepp/ui/uicodeeditor.cpp index 8639d37bb..1b3f3a12e 100644 --- a/src/eepp/ui/uicodeeditor.cpp +++ b/src/eepp/ui/uicodeeditor.cpp @@ -4389,9 +4389,11 @@ void UICodeEditor::drawLineEndings( const DocumentLineRange& lineRange, const Ve Color color( Color( mWhitespaceColor ).blendAlpha( mAlpha ) ); auto fontSize = getCharacterSize(); bool hasMainGlyph = mFont && mFont->getType() == FontType::TTF && - static_cast( mFont )->hasGlyph( 8628 ); - GlyphDrawable* nl = - mFont->getGlyphDrawable( hasMainGlyph ? 0x21B5 /*'↵'*/ : 172 /* '¬'*/, fontSize ); + static_cast( mFont )->hasGlyph( 0x23CE ); // ⏎ + bool hasSecondaryGlyph = !hasMainGlyph && mFont && mFont->getType() == FontType::TTF && + static_cast( mFont )->hasGlyph( 0x21B5 ); // ↵ + GlyphDrawable* nl = mFont->getGlyphDrawable( + hasMainGlyph ? 0x23CE : ( hasSecondaryGlyph ? 0x21B5 /*'↵'*/ : 172 /* '¬'*/ ), fontSize ); nl->setDrawMode( GlyphDrawable::DrawMode::Text ); nl->setColor( color ); for ( auto index = lineRange.first; index <= lineRange.second; index++ ) {