Skip to content

Add LESSUTFCHARDEF instructions for less PUA character display Fixes: #1337#1716

Merged
Finii merged 2 commits into
ryanoasis:masterfrom
nikunjmathur08:add-lessutfchardef-instructions
Nov 20, 2024
Merged

Add LESSUTFCHARDEF instructions for less PUA character display Fixes: #1337#1716
Finii merged 2 commits into
ryanoasis:masterfrom
nikunjmathur08:add-lessutfchardef-instructions

Conversation

@nikunjmathur08

Copy link
Copy Markdown
Contributor

Description

Please explain the changes you made here.

Requirements / Checklist

  • Read the Contributing Guidelines
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan.
    Issue number where discussion took place: #xxx
  • If this contains a font/glyph add its origin as background info below (e.g. URL)
  • Verified the license of any newly added font, glyph, or glyph set. License is: xxx

What does this Pull Request (PR) do?

This PR adds documentation to explain how users can set the LESSUTFCHARDEF environment variable in less to correctly display Private Use Area (PUA) characters from Nerd Fonts.

How should this be manually tested?

This change is a documentation update, so no specific testing is needed. However, users can verify the instructions by running the following command to set the LESSUTFCHARDEF environment variable in their shell and viewing a file with PUA characters in less:

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

Any background context you can provide?

There have been issues with less not displaying Private Use Area (PUA) characters correctly. This is due to the way less handles characters that fall outside standard Unicode ranges. By setting the LESSUTFCHARDEF environment variable, users can ensure that PUA characters are properly rendered when using Nerd Fonts.

What are the relevant tickets (if any)?

Fixes: #1337

Screenshots (if appropriate or helpful)

Updated the README.md to fix ryanoasis#1337.

Add instructions for LESSUTFCHARDEF environment variable to display PUA characters in less
@nikunjmathur08

Copy link
Copy Markdown
Contributor Author

@all-contributors please add nikunjmathur08 for doc

@allcontributors

Copy link
Copy Markdown
Contributor

@nikunjmathur08

I've put up a pull request to add @nikunjmathur08! 🎉

@nikunjmathur08

Copy link
Copy Markdown
Contributor Author

@tkapias @Finii
Please look into the PR and let me know if anything else is required

@tkapias

tkapias commented Oct 15, 2024

Copy link
Copy Markdown

I support this PR.

I also propose to update the Wiki page "Glyph Sets and Code Points" (not editable by PR), with a reminder message and a link inside the Overview section:

Tip

Less users: read this message about codepoints and the LESSUTFCHARDEF variable.
(And update LESSUTFCHARDEF's value when the codepoints change.)

> [!TIP]
> Less users: read [this message](https://github.com/ryanoasis/nerd-fonts#displaying-private-use-area-pua-characters-in-less) about codepoints and the `LESSUTFCHARDEF` variable.
(And update `LESSUTFCHARDEF`'s value when the codepoints change.)

The codepoints in the wiki have been updated at least once a year according to its history.

@nikunjmathur08

Copy link
Copy Markdown
Contributor Author

@tkapias Thank you for the feedback and the support! I’ve made the requested changes in the PR. However, I don’t have permission to edit the Wiki page directly. Could you please update the "Glyph Sets and Code Points" Wiki with the following tip?

Also, could you kindly consider merging this PR as part of Hacktoberfest 2024? I'd love to contribute under the event. Thanks again!

@tkapias

tkapias commented Oct 20, 2024

Copy link
Copy Markdown

I'm not a collaborator on this project, I just opened the ticket. You'll have to wait for them to come and look at the PR. Maybe @Finii.

@Finii

Finii commented Oct 21, 2024

Copy link
Copy Markdown
Collaborator

Hej!

Thanks for the PR 💚

I wonder if we should "hardcode" the codepoint list; maybe it is better to have a tool to update the list, or something?
This will get out of sync with the real codepoints on the next release and then someone has to manually adjust that.

See also #1337 (comment)

[why]
The main readme is already too big anyhow.
We should extract topics into sub-pages rather than adding more.

[how]
Use the Wiki instead and link the Wiki clearly, with entries in the TOC.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
@Finii Finii merged commit 57d2804 into ryanoasis:master Nov 20, 2024
@Finii

Finii commented Dec 23, 2025

Copy link
Copy Markdown
Collaborator

@tkapias

I also propose to update the Wiki page "Glyph Sets and Code Points" (not editable by PR), with a reminder message

I forgot that, updated the page just now. Thanks for the suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add documentation for "less" LESSUTFCHARDEF (Private Use Area characters definition) option

3 participants