Open tkapias opened 1 year ago
Thanks for the fix!
I just spent an entire morning trying to pin-point the issue. I found this #1337 issue while looking for the code points used by Nerd Fonts.
For additional reference, I the version of less that introduced the LESSUTFCHARDEF
is 632, more details are discussed in gwsw/less#275.
From what I understand of the linked issue PUA characters were never meant to be displayed. Maybe it has something to do with the v3 changes in Nerd Fonts?
more
is just more then less
;-D
After I took me years to switch from more to less I probably will switch back ;-)
I will try to come up with a documentation change. Thank you both very much!! :medal_sports:
Can you assign me this issue?
@Cyb3rGhoul Of course, thank you
Here is value suitable for Nerd Fonts v3.2.1 non-Mono version (with nice double width large icons :smile:):
LESSUTFCHARDEF=23fb-23fe:w,2665-2665:w,2b58-2b58:w,e000-e00a:w,e0a0-e0a3:p,e0b0-e0bf:p,e0c0-e0c8:w,e0ca-e0ca:w,e0cc-e0d7:w,e200-e2a9:w,e300-e3e3:w,e5fa-e6b5:w,e700-e7c5:w,ea60-ec1e:w,ed00-efce:w,f000-f2ff:w,f300-f375:w,f400-f533:w,f0001-f1af0:w
Mono version will needs the same value with all :w
replaced by :p
.
Here is value suitable for Nerd Fonts v3.2.1 non-Mono version (with nice double width large icons 😄):
LESSUTFCHARDEF=23fb-23fe:w,2665-2665:w,2b58-2b58:w,e000-e00a:w,e0a0-e0a3:p,e0b0-e0bf:p,e0a0-e0c8:w,e0ca-e0ca:w,e0cc-e0d7:w,e200-e2a9:w,e300-e3e3:w,e5fa-e6b5:w,e700-e7c5:w,ea60-ec1e:w,ed00-efce:w,f000-f2ff:w,f300-f375:w,f400-f533:w,f0001-f1af0:w
Mono version will needs the same value with all
:w
replaced by:p
.
How is this value generated? I'm not sure how to tell which code points are double-width.
Also, I think e0a0-e0c8:w
overlaps with e0a0-e0a3:p
and e0b0-e0bf:p
?
How is this value generated? I'm not sure how to tell which code points are double-width.
Manually. :disappointed:
Also, I think
e0a0-e0c8:w
overlaps withe0a0-e0a3:p
ande0b0-e0bf:p
?
Yeah, sorry, it was a typo I have already fixed somewhere else but missed to fix here: it should be e0c0-e0c8:w
(just fixed in my original comment).
According to https://github.com/gwsw/less/blob/v661/less.nro.VER#L2015-L2017, the code point ranges can also be single code points. It's probably clearer to do that for 2665
, 2b58
, and e0ca
, which results in:
LESSUTFCHARDEF=23fb-23fe:w,2665:w,2b58:w,e000-e00a:w,e0a0-e0a3:p,e0b0-e0bf:p,e0c0-e0c8:w,e0ca:w,e0cc-e0d7:w,e200-e2a9:w,e300-e3e3:w,e5fa-e6b5:w,e700-e7c5:w,ea60-ec1e:w,ed00-efce:w,f000-f2ff:w,f300-f375:w,f400-f533:w,f0001-f1af0:w
Issue
On Linux,less, the most common pager, will no longer print Private Use Area characters by default. I don't know when the transition took place, the version present in the Debian testing repositories (590) does still display Nerd-fonts characters, but the compiled master (633) no longer displays them.
A commit dated September 25, 2022 introduces a new option (
LESSUTFCHARDEF
) that allows you to declare the type of character display according to the code points range.Using this option to declare code points listed in the wiki with the last version force less to display Nerd-fonts characters.
Solution
I think that instructions to export the correct variable should be given to Nerd-fonts users in the wiki or the readme.
Other