FiraCode icon indicating copy to clipboard operation
FiraCode copied to clipboard

Make progress start/end single character

Open tonsky opened this issue 3 years ago • 2 comments

@tonsky - I have an idea: you could add a ligature for the new FiraCode progress bar chars themselves, for the case where a bar is 100% completed. Some progress bar libraries allow setting a "theme" for the bar, with characters for bar start, filled progress, empty progress, and bar end, but do not have a concept of two different characters for bar end depending on whether the progress has reached 100% or not.

This results in a progress bar that looks slightly incomplete:

image

A ligature could solve that by replacing the sequence \uee04\uee02 (filled bar, empty end) with \uee04\uee05 (filled bar, filled end).

Even without all the application-specific ligatures, I think this would be useful.

Originally posted by @joelnordell in https://github.com/tonsky/FiraCode/issues/1183#issuecomment-1071042997

tonsky avatar Mar 18 '22 13:03 tonsky

@joelnordell yeah, that was an oversight on my part. Start/end should be the same always, I think

tonsky avatar Mar 18 '22 13:03 tonsky

Perhaps the right solution is to introduce two new characters as "auto-adapting start/end" along with ligatures that make them appear empty or filled based on the immediately-adjacent bar character (before for end cap, after for start cap).

e.g. image

By making them new characters, existing behavior can be maintained for the existing chars, for any use cases where someone wants to explicitly control whether the ends are filled or not (like in your original example).

joelnordell avatar Mar 18 '22 13:03 joelnordell