Skip to content

[Bug] Double width icons and the codepoint change in Nerd Fonts Material Design Icons #836

@tkapias

Description

@tkapias
  • os: Debian testing
  • lsd --version: 0.23.1
  • echo $TERM: tmux-256color (inside rxvt-unicode-256color)
  • echo $LS_COLORS: ""

Issue

Some icon glyphs chosen for lsd are not displayed as single wide in mono and it breaks the visual alignment with other lines.

  • I made a list of these icons and tested in urxvt, rxvt and st terminals and with different NerdFonts Mono fonts, even after patching my own.
  • Sometimes the icon is aligned to left or center but always on 2 spaces.

image

image

Those glyphs are in a collection of glyphs with a scaling problem in mono.

I printed all the glyphs in my patched font and here are the ones with a width problem:

image

Context

With its latest release NerdFonts project announced that Material Design glyphs where moved to a new codepoint and the old one will be deleted in the futur.

Exemple, the glyph used for torrents is marked as obsolete:

image

Sadly, they wrote that they fixed some scaling issue too but the new glyph is too wide even when I use the last fontpatcher.
Maybe that it will change with a next release.

Questions

The fact that these icons codepoints will soon be obsolete is a good occasion to rethink the icons choices.

Can you check if you can reproduce this issue, and find alternatives for these icons at least?

  • double width characters in icon.rs (display nicelay in the bowser but not in most terminals)
impl ByType {
    pub fn unicode() -> Self {
        ByType {
            dir: "\u{1f4c2}".into(),           // '📂'
            file: "\u{1f4c4}".into(),          // '📄'
            pipe: "\u{1f4e9}".into(),          // '📩'
            socket: "\u{1f4ec}".into(),        // '📬'
            symlink_file: "\u{1f516}".into(),  // '🔖'
            device_block: "\u{1f4bd}".into(),  // '💽'
            special: "\u{1f4df}".into(),       // '📟'
        }
    }
}

            ("api", "\u{f98c}"),             // "歷"
            ("bio", "\u{f910}"),             // "蘿"
            ("fpl", "\u{f910}"),             // "蘿"
            ("m3u8", "\u{f910}"),            // "蘿"
            ("m3u", "\u{f910}"),             // "蘿"
            ("pls", "\u{f910}"),             // "蘿"
            ("rproj", "\u{fac5}"),           // "鉶"
            ("torrent", "\u{f98c}"),         // "歷"
            ("vlc", "\u{f910}"),             // "蘿"
            ("wpl", "\u{f910}"),             // "蘿"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions