-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add documentation for "less" LESSUTFCHARDEF (Private Use Area characters definition) option #1337
Comments
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 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? |
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 😄): 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 |
How is this value generated? I'm not sure how to tell which code points are double-width. Also, I think |
Manually. 😞
Yeah, sorry, it was a typo I have already fixed somewhere else but missed to fix here: it should be |
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
|
Absolutely!
Sent from Nine
…________________________________
From: Nikunj Mathur ***@***.***>
Sent: Thursday, October 10, 2024 16:11
To: ryanoasis/nerd-fonts
Cc: Fini; Comment
Subject: Re: [ryanoasis/nerd-fonts] Add documentation for "less" LESSUTFCHARDEF (Private Use Area characters definition) option (Issue #1337)
Is this issue still open? Can I work on this? @tkapias
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
Please do @nikunjmathur08, I was still using the outdated values that I wrote in the first comment. I will now switch to the ones in @injust's post. The only way to close this issue will probably be by finding an updated and parsable list of codepoints in the repository (I don't know if they are listed in other places than the wiki) and writing a script in |
glyphnames.json in the repo root has all codepoints. But not as range but individually.
Sent from Nine
…________________________________
From: Tomasz Kapias ***@***.***>
Sent: Thursday, October 10, 2024 18:13
To: ryanoasis/nerd-fonts
Cc: Fini; Mention
Subject: Re: [ryanoasis/nerd-fonts] Add documentation for "less" LESSUTFCHARDEF (Private Use Area characters definition) option (Issue #1337)
Please do @nikunjmathur08,
I was still using the outdated values that I wrote in the first comment.
I will now switch to the ones in @injust's post.
The only way to close this issue will probably be by finding an updated and parsable list of codepoints in the repository (I don't know if they are listed in other places than the wiki) and writing a script in bin/script/ to help users generate the right env variables for less.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
To avoid constantly updating ranges you can just use this: export LESS="-r"
export LESSUTFBINFMT='*n%C' |
…uctions Add LESSUTFCHARDEF instructions for less PUA character display Fixes: #1337
Added @nikelborm's fix to the Wiki page. |
I will already add you as contributor 💚 This is not to silence you ;) |
@allcontributors please add @powerman for doc |
Oh :-D |
Good point! So only issue is missing ranges starting somewhere near EA60 and ending somewhere near F533. If current version of Nerd Font still uses these ranges then they should be included in LESSUTFCHARDEF. |
As for |
Hmm. https://www.unicode.org/charts/PDF/UE000.pdf says:
|
🤦♀️ Whatever, correcting, tnx |
/spent 3h Wah, this is not Gitlab ;) |
Sorry about this! :) I'm a bit afraid to saying so, but to me it looks like your latest version (one with Thanks!!! P.S. Probably I'll have to update ranges in https://github.com/powerman/wcwidth-icons this way too. |
Just curious about what effect LESSUTFBINFMT here does? |
I would assume ...
@powerman They themselves suggest to set what we do: |
I've read the doc, I mean practically if you set this env var does it help to render character on the screenshot beautifully? It helped for me in all of such cases where I've seen this |
"Beautifully"? Well, that is all just about enabling It has nothing to do with how the glyphs are rendered/placed by the terminal. Now the question is what you mean by beauty ;) |
Sorry I'm not a native speaker. I don't know how to say it in other words. It's the less's job to give the character to the terminal. And if less sees some character which is not whitelisted it prints it as sequence of ascii characters representing the hex of the initial character. I mean that |
Setting this variable at least gives the terminal the chance to decide if it can render it. Without it the terminal emulator (?) (GUI program) just gets sequence of ascii characters
So it's not just can. It does. And basically I'm asking if you set this var, will your terminal be able to render the character or is it just breaks? |
|
Well, your terminal can render what it can. If you set this |
At a glance - |
But it can not ask the terminal, and that is free to render them as it likes. 🤷♀️ All these problems do not occur if you use |
These fonts has much more critical issue: too small icons, all using just 1 cell! 😢 Small enough to be hardly usable at all - at least for people with less than perfect vision. |
Hmm, Only 🤷♀️ Maybe have a look at #1103, but then, you know that already I guess. |
Ahh, I see. Thanks for the explanation! TBH, I don't think this will change anything, to me at least. Having to add extra space after an icon always feels like a bug to me. It turns out to be a feature… well, it happens. 😄 These extra spaces really create issues with a lot of tools: they might insert an unwanted line wraps after an icon, they might show only left half of an icon if it happens to start at last cell, the cursor movement over icons became counter-intuitive, it breaks words counting/matching/etc. using regexp/patterns, GUI tools (e.g. browsers) will actually render that extra space, and probably worst of these is icon is often not in the middle of a word but at the end or is a separate "word" which leads to having 2 spaces after an icons which many tools will "fix" by removing 2nd "extra" space. So, to me it looks like only real way to solve these issues is to use Propo fonts, use |
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.
export LESSUTFCHARDEF=23fb-23fe:p,2665:p,26a1:p,2b58:p,e000-e00a:p,e0a0-e0a2:p,e0a3:p,e0b0-e0b3:p,e0b4-e0c8:p,e0ca:p,e0cc-e0d4:p,e200-e2a9:p,e300-e3e3:p,e5fa-e6a6:p,e700-e7c5:p,ea60-ebeb:p,f000-f2e0:p,f300-f32f:p,f400-f532:p,f500-fd46:p,f0001-f1af0:p
Solution
I think that instructions to export the correct variable should be given to Nerd-fonts users in the wiki or the readme.
Other
The text was updated successfully, but these errors were encountered: