Skip to content
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

Please document codepoint ranges #108

Closed
blueyed opened this issue Oct 17, 2016 · 7 comments
Closed

Please document codepoint ranges #108

blueyed opened this issue Oct 17, 2016 · 7 comments

Comments

@blueyed
Copy link
Collaborator

blueyed commented Oct 17, 2016

I am looking into using a custom wcwidth function/library (https://github.com/termux/wcwidth; via LD_PRELOAD), where I'd like it to return the proper width for the wide glyphs (which appear to be all/most, right?).

Therefore a list of used codepoints would be useful.

I've came up with the following, but it does not seem to be accurate, e.g. the Linux symbol from Font Awesome () is at 0xe712, although the range is {0xf000, 0xf295}, // symbolsFontAwesomeRangeStart (

nerd-fonts/font-patcher

Lines 248 to 249 in 72ca7b7

symbolsFontAwesomeRangeStart = 0xF000
symbolsFontAwesomeRangeEnd = 0xF295
).

What am I missing?

        // Nerd Font (https://github.com/ryanoasis/nerd-fonts).
        // Source: https://github.com/ryanoasis/nerd-fonts/blob/master/font-patcher
        {0xe000, 0xe00a},  // symbolsPomiconsRangeStart
        {0xe0a0, 0xe0a2},  // symbolsPowerlineRange1Start
        {0xe0b0, 0xe0b3},  // symbolsPowerlineRange2Start
        {0xe0a3, 0xe0a3},  // symbolsPowerlineExtraRange1Start
        {0xe0b4, 0xe0c8},  // symbolsPowerlineExtraRange2Start
        {0xe0cc, 0xe0d4},  // symbolsPowerlineExtraRange3Start
        {0xe4fa, 0xe52a},  // symbolsOriginalRangeStart
        {0xe600, 0xe6c5},  // symbolsDeviconsRangeStart
        {0xf000, 0xf295},  // symbolsFontAwesomeRangeStart
        {0xf000, 0xf0db},  // symbolsOcticonsRangeStart
        {0xf100, 0xf115},  // symbolsFontLinuxRangeStart

The tables in the README add to the confusion, since they do not take into account that some sets get shifted etc: https://github.com/ryanoasis/nerd-fonts/blob/master/readme.md

After all I could imagine to create some pre-processor that would scan the Nerd Font, look at the expected width of the glyphs and use the output with wcwidth then.

I am using 'Ubuntu Mono derivative Powerline Nerd Font Complete.ttf' with rxvt-unicode on Arch Linux.

@blueyed
Copy link
Collaborator Author

blueyed commented Oct 20, 2016

Some more info at #40.

@ryanoasis
Copy link
Owner

I believe we can close this now:

@blueyed
Copy link
Collaborator Author

blueyed commented Sep 28, 2018

I think it would be good to have table in the README still.

Seti-UI + Custom: U+e4fa-U+e52e
Devicons: U+e600-U+e6c5
Powerline Symbols: U+e0a0-U+e0a2
Powerline Symbols: U+e0b0-U+e0b3
Powerline Extra Symbols: U+e0a3-U+e0a3
Powerline Extra Symbols: U+e0b4-U+e0c8
Powerline Extra Symbols: U+e0ca-U+e0ca
Powerline Extra Symbols: U+e0cc-U+e0d4
Pomicons: U+e000-U+e00a
Font Awesome: U+f000-U+f2e0
Font Awesome Extension: U+e000-U+e0a9
Font Logos (Font Linux): U+f100-U+f11c
Power Symbols: U+23fb-U+23fe
Power Symbols: U+2b58-U+2b58
Octicons: U+f000-U+f105
Octicons: U+2665-U+2665
Octicons: U+26a1-U+26a1
Octicons: U+f27c-U+f27c
Material: U+f001-U+f847
Weather Icons: U+f000-U+f0eb

Via:

for p in PATCH_SET:
    print('%s: U+%x-U+%x' % (p['Name'], p['SymStart'], p['SymEnd']))

in font-patcher.

This is helpful when configuring e.g. symbol_map in kitty terminal, where you need those ranges.

@blueyed blueyed reopened this Sep 28, 2018
@dustinblackman
Copy link

@blueyed there's some things missing in there unfortunately. The ranges from SrcStart and SrcEnd are needed too, for example the Dockerfile icon from Devicons is in there. Here's some really lazy shit to get everything you need for Kitty for those ending up here from Google.

curl -s https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/font-patcher | grep "'SymStart':" | grep -oE '0x[A-Z00-9]+' | sed '$!N;s/\n/-/' | awk '{print tolower($0)}' | awk 'gsub("0x", "U+")' | grep -v '0000' | tr '\n' ','

U+e4fa-U+e52e,U+e5fa-U+e62e,U+e600-U+e6c5,U+e700-U+e7c5,U+e0a0-U+e0a2,U+e0b0-U+e0b3,U+e0a3-U+e0a3,U+e0b4-U+e0c8,U+e0ca-U+e0ca,U+e0cc-U+e0d4,U+e000-U+e00a,U+f000-U+f2e0,U+e000-U+e0a9,U+e200-U+e2a9,U+f100-U+f11c,U+f300-U+f31c,U+23fb-U+23fe,U+2b58-U+2b58,U+f000-U+f105,U+f400-U+f505,U+2665-U+2665,U+f27c-U+f27c,U+f4a9-U+f4a9,U+f001-U+f847,U+f500-U+fd46,U+f000-U+f0eb,U+e300-U+e3eb,

@yatli
Copy link

yatli commented May 9, 2019

I've copied the complete list down from the web site and parsed it.
It has changed in a few places (weather, custom+seti, devicons, font linux & material):

let NerdFont = [|
    (0x23fb, 0x23fe)  // Power Symbols
    (0x2665, 0x2665)  // Octicons
    (0x26a1, 0x26a1)  // Octicons
    (0x2b58, 0x2b58)  // Power Symbols
    (0xe000, 0xe00a)  // Pomicons
    (0xe0a0, 0xe0a2)  // Powerline Symbols
    (0xe0a3, 0xe0a3)  // Powerline Extra Symbols
    (0xe0b0, 0xe0b3)  // Powerline Symbols
    (0xe0b4, 0xe0c8)  // Powerline Extra Symbols
    (0xe0ca, 0xe0ca)  // Powerline Extra Symbols
    (0xe0cc, 0xe0d4)  // Powerline Extra Symbols
    (0xe200, 0xe2a9)  // Font Awesome Extension
    (0xe300, 0xe3e3)  // Weather
    (0xe5fa, 0xe62e)  // Custom + Seti
    (0xe700, 0xe7c5)  // Devicons
    (0xf000, 0xf2e0)  // Font Awesome
    (0xf300, 0xf31c)  // Font Logos (Font Linux)
    (0xf400, 0xf4a8)  // Octicons
    (0xf500, 0xfd46)  // Material
|]

@ryanoasis
Copy link
Owner

Thanks everyone, closing this for now because of:

Feel free to edit the Wiki as you see fit or submit a PR if you'd like something more.

@github-actions
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a new issue, complete the issue template with all the details necessary to reproduce, and mention this issue as reference.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants