Skip to content

Commit

Permalink
fonts: switch to Monaspace
Browse files Browse the repository at this point in the history
- Fix kitty font settings
  • Loading branch information
geodimm committed Jan 7, 2025
1 parent 11f0028 commit 5bda06a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
5 changes: 2 additions & 3 deletions kitty/kitty.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@ active_tab_font_style bold

# Fonts
font_size 16.0
font_family family="Menlo"
font_family family='Monaspace Argon Var' style=Light variable_name=MonaspaceArgonVar
bold_font auto
italic_font auto
bold_italic_font auto

include nerd-font-symbols.conf

text_composition_strategy legacy

# Cursor
cursor_shape block
cursor_blink_interval 0
Expand Down Expand Up @@ -110,3 +108,4 @@ map --when-focus-on var:IS_NVIM alt+l

# }}}


35 changes: 18 additions & 17 deletions kitty/nerd-font-symbols.conf
Original file line number Diff line number Diff line change
@@ -1,49 +1,50 @@
# Use additional nerd symbols
# See https://github.com/ryanoasis/nerd-fonts/wiki/Glyph-Sets-and-Code-Points
# kitty is shipped with "Symbols Nerd Font Mono" so no need to install it

# Seti-UI + Custom
symbol_map U+E5FA-U+E6B7 Symbols Nerd Font
symbol_map U+E5FA-U+E6B7 Symbols Nerd Font Mono

# Devicons
symbol_map U+E700-U+E8EF Symbols Nerd Font
symbol_map U+E700-U+E8EF Symbols Nerd Font Mono

# Font Awesome
symbol_map U+F000-U+F2E0 Symbols Nerd Font
symbol_map U+F000-U+F2E0 Symbols Nerd Font Mono

# Font Awesome Extension
symbol_map U+E200-U+E2A9 Symbols Nerd Font
symbol_map U+E200-U+E2A9 Symbols Nerd Font Mono

# Material Design Icons
symbol_map U+F0001-U+F1AF0 Symbols Nerd Font
symbol_map U+F0001-U+F1AF0 Symbols Nerd Font Mono

# Weather
symbol_map U+E300-U+E3E3 Symbols Nerd Font
symbol_map U+E300-U+E3E3 Symbols Nerd Font Mono

# Octicons
symbol_map U+F400-U+F533,U+2665,U+26A1 Symbols Nerd Font
symbol_map U+F400-U+F533,U+2665,U+26A1 Symbols Nerd Font Mono

# Powerline Symbols
symbol_map U+E0A0-U+E0A2,U+E0B0-U+E0B3 Symbols Nerd Font
symbol_map U+E0A0-U+E0A2,U+E0B0-U+E0B3 Symbols Nerd Font Mono

# Powerline Extra Symbols
symbol_map U+E0A3,U+E0B4-U+E0C8,U+E0CA,U+E0CC-U+E0D7 Symbols Nerd Font
symbol_map U+E0A3,U+E0B4-U+E0C8,U+E0CA,U+E0CC-U+E0D7 Symbols Nerd Font Mono

# IEC Power Symbols
symbol_map U+23FB-U+23FE,U+2B58 Symbols Nerd Font
symbol_map U+23FB-U+23FE,U+2B58 Symbols Nerd Font Mono

# Font Logos
symbol_map U+F300-U+F381 Symbols Nerd Font
symbol_map U+F300-U+F381 Symbols Nerd Font Mono

# Pomicons
symbol_map U+E000-U+E00A Symbols Nerd Font
symbol_map U+E000-U+E00A Symbols Nerd Font Mono

# Codicons
symbol_map U+EA60-U+EC1E Symbols Nerd Font
symbol_map U+EA60-U+EC1E Symbols Nerd Font Mono

# Additional sets
# Heavy Angle Brackets
symbol_map U+E276C-U+E2771 Symbols Nerd Font
# Heavy Angle Brackets - Those appear smaller with the patched font so let's not use them
#symbol_map U+276C-U+2771 Symbols Nerd Font Mono
# Box Drawing
symbol_map U+2500-U+259F Symbols Nerd Font
symbol_map U+2500-U+259F Symbols Nerd Font Mono
# Progress
symbol_map U+EE00-U+EE0B Symbols Nerd Font
symbol_map U+EE00-U+EE0B Symbols Nerd Font Mono
12 changes: 6 additions & 6 deletions scripts/fonts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ function install_fonts() {
esac
install -d -m 0755 -o "${USER}" -g "${group}" "${fonts_dir}"

# Font: NerdFontsSymbolsOnly
# https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/NerdFontsSymbolsOnly
# Font: Monaspace Argon Var
# https://github.com/githubnext/monaspace/tree/master/fonts/variable/
local install_dir="/tmp/fonts"
rm -rf "${install_dir}" && mkdir -p "${install_dir}"

git clone --quiet --filter=blob:none --sparse "https://github.com/ryanoasis/nerd-fonts.git" "${install_dir}"/nerd-fonts
git clone --quiet --filter=blob:none --sparse "https://github.com/githubnext/monaspace.git" "${install_dir}"/monaspace
(
cd "${install_dir}"/nerd-fonts
git sparse-checkout add patched-fonts/NerdFontsSymbolsOnly
find . -type f -name '*.ttf' ! -name '*Propo*' -exec cp "{}" "${fonts_dir}" \;
cd "${install_dir}"/monaspace
git sparse-checkout add fonts/variable/
find . -type f -name '*.ttf' -exec cp "{}" "${fonts_dir}" \;
)

if [[ "${PLATFORM}" == "linux" ]]; then
Expand Down

0 comments on commit 5bda06a

Please sign in to comment.