Skip to content

Nerd fonts cause misaligned columns in detail mode with names first #1802

@erhhung

Description

@erhhung

Environment details (Put x in the checkbox along with the information)

  • Operating System: macOS Sonoma 14.2.1
  • Desktop Environment:
  • Terminal Emulator: iTerm2 3.4.23
  • Terminal Font: DroidSansM Nerd Font Regular 16, no ligatures
  • Shell: Bash 5.2.26
  • Custom desktop opener (if applicable):
  • Program options used: NNN_OPTS=acdeoEHQR
  • Configuration options set:
  • Plugins are installed: NNN_PLUG=v:-preview-tui;y:-cbcopy-mac
  • Issue exists on nnn master

Exact steps to reproduce the issue

  1. Create a build with Nerd Fonts and name first options enabled:
    make clean; make O_NERD=1 O_NAMEFIRST=1; ./nnn
image
  1. Press d to hide the detail columns:
image

Notice that the file size column has not been properly cleared.

  1. If, instead, build without either above options, columns are aligned:

make clean; make O_NERD=1; ./nnn

image

make clean; make O_NAMEFIRST=1; ./nnn

image

Other observations

  1. Changing the terminal font in iTerm to other Nerd fonts made no difference.
  2. I'm aware that some Nerd font glyphs yield double the character widths even though they visually take up only a single cell, but I'm not sure if there's a consistent way to account for that during rendering of the columns.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions