jfelchner / ruby-progressbar

Ruby/ProgressBar is a text progress bar library for Ruby.
MIT License
1.58k stars 132 forks source link

Support for FiraCode progressbar #178

Closed krissi closed 2 years ago

krissi commented 2 years ago

New Behavior

The FiraCode font (https://github.com/tonsky/FiraCode) includes special glyphs for progressbars. In the current implementation the | at the beginning and end of the bar are not part of the progressbar itself, but in the format string. When using the glyphs from the FireCode font, the first char of the bar is part of the bar as well (U+EE00/U+EE03, see image below), the same for the last char.

I wonder if there is a way in the current implementation to fully use the code which I am missing and if not, if you are willing to accept PRs regarding this feature.

FiraCode progressbars in a nutshell

Glyphs In action

jfelchner commented 2 years ago

I don't think this would be easily possible unfortunately. Each progress mark needs to be the same thing. I would much prefer to have seen FiraCode make the first mark a vertical line with padding on the righthand side of the glyph and the last mark padding followed by a vertical line on the lefthand side of the glyph so that each progress mark could be identical.

jfelchner commented 2 years ago

@krissi if you submit a PR to FiraCode, link it back here so we can track it.