fzf icon indicating copy to clipboard operation
fzf copied to clipboard

Spinner characters don't have glyphs in any of the default console fonts on Windows

Open vovcacik opened this issue 2 years ago • 4 comments

  • [x] I have read through the manual page (man fzf)
  • [x] I have the latest version of fzf
  • [x] I have searched through the existing issues

Info

  • OS
    • [ ] Linux
    • [ ] Mac OS X
    • [x] Windows
    • [ ] Etc.
  • Shell
    • [ ] bash
    • [ ] zsh
    • [ ] fish

Problem / Steps to reproduce

The braille glyphs are not present. The fallback spinner made of slashes would be fine.

https://github.com/junegunn/fzf/blob/7191ebb615f5d6ebbf51d598d8ec853a65e2274d/src/terminal.go#L405-L408

The problem can also be seen in screenshot from #2329 (the first yellow replacement character).

vovcacik avatar Oct 12 '21 12:10 vovcacik

I don't have a Windows PC, but I have a Windows Server 2016 VM running on AWS. And it looks like the spinner is properly rendered on its cmd.exe. What am I missing?

image

Please note that I'm not at all familiar with Windows platform, so I'm open to any suggestions.

junegunn avatar Oct 15 '21 13:10 junegunn

test-braille.bat
@echo off
REM save as this in UTF-8
chcp 65001
echo "⠹"
pause

image (Consolas)

When you run the batch, displaying the braille glyph depends on the font your console is using. I have tried Consolas, Courier New, Lucida Console and Raster fonts; none of them displayed the character correctly. I have got one font that works "NSimSun", but that's not a standard font.

image (NSimSun)

What's the font you are using in your instance of Windows Server?

vovcacik avatar Oct 19 '21 20:10 vovcacik

image

It's set to 굴림체, a Korean font. I don't remember if I set this myself, or it was the system default.

junegunn avatar Oct 23 '21 13:10 junegunn

That clarifies why it works for you. The default font for cmd is Consolas and that font does not include Braille characters, so I would disable them in fzf for windows altogether (regardless --unicode, --no--unicode switches).

vovcacik avatar Oct 24 '21 19:10 vovcacik