@@ -97,8 +97,15 @@ program fortty |
| 97 | 97 | end if |
| 98 | 98 | |
| 99 | 99 | ! If no configured fallback or it failed, try fontconfig auto-detection |
| 100 | + ! First try to find a font with common Unicode symbols (chevron, arrows, etc.) |
| 101 | + if (.not. ren%font%has_fallback) then |
| 102 | + fallback_path = font_find_for_codepoint(int(z'276F')) ! Heavy right-pointing angle (❯) |
| 103 | + if (len_trim(fallback_path) > 0) then |
| 104 | + call renderer_load_fallback_font(ren, trim(fallback_path)) |
| 105 | + end if |
| 106 | + end if |
| 107 | + ! Then try Nerd Font-specific devicons |
| 100 | 108 | if (.not. ren%font%has_fallback) then |
| 101 | | - ! Try Nerd Font-specific devicons first (U+E5FF), then common icons (U+F07B) |
| 102 | 109 | fallback_path = font_find_for_codepoint(int(z'E5FF')) ! Nerd Font devicon |
| 103 | 110 | if (len_trim(fallback_path) > 0) then |
| 104 | 111 | call renderer_load_fallback_font(ren, trim(fallback_path)) |
@@ -117,7 +124,20 @@ program fortty |
| 117 | 124 | end if |
| 118 | 125 | end if |
| 119 | 126 | |
| 120 | | - ! If fontconfig didn't work, try hardcoded paths |
| 127 | + ! If fontconfig didn't work, try hardcoded paths (macOS) |
| 128 | + if (.not. ren%font%has_fallback) then |
| 129 | + fallback_path = "/System/Library/Fonts/Apple Symbols.ttf" |
| 130 | + call renderer_load_fallback_font(ren, trim(fallback_path)) |
| 131 | + end if |
| 132 | + if (.not. ren%font%has_fallback) then |
| 133 | + fallback_path = "/Library/Fonts/MesloLGLDZNerdFontMono-Regular.ttf" |
| 134 | + call renderer_load_fallback_font(ren, trim(fallback_path)) |
| 135 | + end if |
| 136 | + if (.not. ren%font%has_fallback) then |
| 137 | + fallback_path = "/Library/Fonts/MesloLGMNerdFontMono-Regular.ttf" |
| 138 | + call renderer_load_fallback_font(ren, trim(fallback_path)) |
| 139 | + end if |
| 140 | + ! Linux paths |
| 121 | 141 | if (.not. ren%font%has_fallback) then |
| 122 | 142 | fallback_path = "/usr/share/fonts/TTF/MesloLGLDZNerdFontMono-Regular.ttf" |
| 123 | 143 | call renderer_load_fallback_font(ren, trim(fallback_path)) |
@@ -281,14 +301,14 @@ program fortty |
| 281 | 301 | |
| 282 | 302 | x = real(col - 1) * cell_width |
| 283 | 303 | |
| 304 | + ! Draw selection background if selected (for all cells including spaces) |
| 305 | + if (selection_contains(sel, row, col)) then |
| 306 | + call renderer_draw_rect(ren, x, y, real(cell_width), real(cell_height), & |
| 307 | + 0.3, 0.3, 0.6, 1.0) |
| 308 | + end if |
| 309 | + |
| 284 | 310 | ! Only render cells with actual text content |
| 285 | 311 | if (cell%codepoint /= 32 .and. cell%codepoint /= 0) then |
| 286 | | - ! Draw selection background if selected (only for text cells) |
| 287 | | - if (selection_contains(sel, row, col)) then |
| 288 | | - call renderer_draw_rect(ren, x, y, real(cell_width), real(cell_height), & |
| 289 | | - 0.3, 0.3, 0.6, 1.0) |
| 290 | | - end if |
| 291 | | - |
| 292 | 312 | r = real(cell%fg%r) / 255.0 |
| 293 | 313 | g = real(cell%fg%g) / 255.0 |
| 294 | 314 | b = real(cell%fg%b) / 255.0 |
@@ -308,13 +328,14 @@ program fortty |
| 308 | 328 | |
| 309 | 329 | x = real(col - 1) * cell_width |
| 310 | 330 | |
| 331 | + ! Draw selection background if selected (for all cells including spaces) |
| 332 | + if (selection_contains(sel, row, col)) then |
| 333 | + call renderer_draw_rect(ren, x, y, real(cell_width), real(cell_height), & |
| 334 | + 0.3, 0.3, 0.6, 1.0) |
| 335 | + end if |
| 336 | + |
| 311 | 337 | ! Only render cells with actual text content |
| 312 | 338 | if (cell%codepoint /= 32 .and. cell%codepoint /= 0) then |
| 313 | | - ! Draw selection background if selected (only for text cells) |
| 314 | | - if (selection_contains(sel, row, col)) then |
| 315 | | - call renderer_draw_rect(ren, x, y, real(cell_width), real(cell_height), & |
| 316 | | - 0.3, 0.3, 0.6, 1.0) |
| 317 | | - end if |
| 318 | 339 | r = real(cell%fg%r) / 255.0 |
| 319 | 340 | g = real(cell%fg%g) / 255.0 |
| 320 | 341 | b = real(cell%fg%b) / 255.0 |