Skip to content

Instantly share code, notes, and snippets.

@materro
Created March 23, 2023 10:05
Show Gist options
  • Save materro/2c5ec61e7eb21df25e5f7f11a95d4df7 to your computer and use it in GitHub Desktop.
Save materro/2c5ec61e7eb21df25e5f7f11a95d4df7 to your computer and use it in GitHub Desktop.
Generate Consolas Nerd Font

Create Consolas Nerd Font using Font Pather

  1. Download Font Patcher and extract it. You will need font-patcher script.
  2. Copy Consolas font from C:\Windows\Fonts.

    You will get (probably) 4 files: consola.ttf, consolab.ttf, consolai.ttf, consolaz.ttf.

  3. Install required dependencies (Ubuntu):
apt-get install python3-fontforge
  1. If You will get ValueError: not enough values to unpack (expected 3, got 2) edit font-patcher to fix it.
  2. Run script for all ttf files:
cd FontPatcher
fontforge -script font-patcher ../Consolas/consola.ttf
fontforge -script font-patcher ../Consolas/consolab.ttf
fontforge -script font-patcher ../Consolas/consolai.ttf
fontforge -script font-patcher ../Consolas/consolaz.ttf
  1. Enjoy 😁
ls
'Consolas Bold Italic Nerd Font.ttf'  'Consolas Italic Nerd Font.ttf'   font-patcher   src
'Consolas Bold Nerd Font.ttf'         'Consolas Nerd Font.ttf'          bin            readme.md

More information at Nerd Fonts repo.

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