Skip to content

Instantly share code, notes, and snippets.

@enihsyou
Created May 3, 2022 07:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enihsyou/06196fb556ea718d0230ad3cd9175355 to your computer and use it in GitHub Desktop.
Save enihsyou/06196fb556ea718d0230ad3cd9175355 to your computer and use it in GitHub Desktop.
my kitty symbol_map section for Nerd Font patch and CJK characters.

What's this

symbol_map section from my kitty.conf dotfile, it follows Kitty best practice to NOT use patched font in favor of multiple symbol_map directives.

I use Sarasa Mono for CJK unicode ranges and Menlo for misc codepoints which Nerd Font doesn't cover.

Copy and paste (maybe follow by some modifacations) into your kitty.conf, and your terminal will be beautiful.

I named it kitty.ini to force syntax highlighting on GitHub gist

# symbol_map
#: E.g. symbol_map U+E0A0-U+E0A3,U+E0C0-U+E0C7 PowerlineSymbols
#: Map the specified unicode codepoints to a particular font. Useful
#: if you need special rendering for some symbols, such as for
#: Powerline. Avoids the need for patched fonts. Each unicode code
#: point is specified in the form U+<code point in hexadecimal>. You
#: can specify multiple code points, separated by commas and ranges
#: separated by hyphens. symbol_map itself can be specified multiple
#: times. Syntax is::
#: symbol_map codepoints Font Family Name
# ref: https://erwin.co/kitty-and-nerd-fonts/
# ref: https://github.com/ryanoasis/nerd-fonts/wiki/Glyph-Sets-and-Code-Points#glyph-sets
# Nerd Fonts - Seti-UI + Custom
symbol_map U+e5fa-U+e631 Symbols Nerd Font
# Nerd Fonts - Devicons
symbol_map U+e700-U+e7c5 Symbols Nerd Font
# Nerd Fonts - Font awesome
symbol_map U+f000-U+f2e0 Symbols Nerd Font
# Nerd Fonts - Font awesome extension
symbol_map U+e200-U+e2a9 Symbols Nerd Font
# Nerd Fonts - Material Design Icons
symbol_map U+f500-U+fd46 Symbols Nerd Font
# Nerd Fonts - Weather Icons
symbol_map U+e300-U+e3eb Symbols Nerd Font
# Nerd Fonts - Octicons
symbol_map U+f400-U+f4a9,U+2665,U+26A1 Symbols Nerd Font
# Nerd Fonts - Powerline
symbol_map U+e0a0-U+e0a2,U+e0b0-U+e0b3 Symbols Nerd Font
# Nerd Fonts - Powerline Extra
symbol_map U+e0a3,U+e0b4-U+e0c8,U+e0ca,U+e0cc-U+e0d4 Symbols Nerd Font
# Nerd Fonts - IEC Power Symbols
symbol_map U+23fb-U+23fe,U+2b58 Symbols Nerd Font
# Nerd Fonts - Font Logos (Formerly Font Linux)
symbol_map U+F300-U+F32d Symbols Nerd Font
# Nerd Fonts - Pomicons
symbol_map U+E000-U+E00A Symbols Nerd Font
# Nerd Fonts - Codicons
symbol_map U+ea60-U+ebeb Symbols Nerd Font
# Misc Code Point Fixes
symbol_map U+21B5,U+25B8,U+2605,U+2630,U+2632,U+2714,U+279C Menlo
# ref: https://stackoverflow.com/questions/1366068
# Block Comment
# CJK Unified Ideographs Common
symbol_map U+4E00-U+9FFF Sarasa Mono SC
# CJK Unified Ideographs Extension A Rare
symbol_map U+3400-U+4DBF Sarasa Mono SC
# CJK Unified Ideographs Extension B Rare, historic
symbol_map U+20000-U+2A6DF Sarasa Mono SC
# CJK Unified Ideographs Extension C Rare, historic
symbol_map U+2A700-U+2B73F Sarasa Mono SC
# CJK Unified Ideographs Extension D Uncommon, some in current use
symbol_map U+2B740-U+2B81F Sarasa Mono SC
# CJK Unified Ideographs Extension E Rare, historic
symbol_map U+2B820-U+2CEAF Sarasa Mono SC
# CJK Unified Ideographs Extension F Rare, historic
symbol_map U+2CEB0-U+2EBEF Sarasa Mono SC
# CJK Unified Ideographs Extension G Rare, historic
symbol_map U+30000-U+3134F Sarasa Mono SC
# CJK Compatibility Ideographs Duplicates, unifiable variants, corporate characters
symbol_map U+F900-U+FAFF Sarasa Mono SC
# CJK Compatibility Ideographs Supplement Unifiable variants
symbol_map U+2F800-U+2FA1F Sarasa Mono SC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment