# ryanoasis/nerd-fonts architecture

> Architecture diagram of the GitHub repository ryanoasis/nerd-fonts, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ryanoasis/nerd-fonts
- Repository: https://github.com/ryanoasis/nerd-fonts

## Overview

Nerd Fonts aggregates icon glyph sets, patches developer-oriented fonts, and distributes pre-patched font families. The main workflow is a user supplying a font to the FontForge patcher, which adds glyphs from the icon collections and produces a patched font; users can also obtain existing families through the install script or repository collection. The graph preserves glyph metadata generation and font-name processing as internal layers. The README documents the product flow, but the patcher implementation itself was not excerpted, so its internal calls are not shown.

Main entry points: [`src/glyphs`](https://github.com/ryanoasis/nerd-fonts/tree/master/src/glyphs) (Icon Glyph Sets), [`font-patcher`](https://github.com/ryanoasis/nerd-fonts/blob/master/font-patcher) (Font Patcher), [`install.sh`](https://github.com/ryanoasis/nerd-fonts/blob/master/install.sh) (Install Script), [`patched-fonts`](https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts) (Patched Families)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_use["Font Usage"]
  node_install["Install Script<br/>[install.sh]"]
end

subgraph group_patch["Patching"]
  node_font_patcher["Font Patcher"]
  node_patched_result["Patched Font"]
end

subgraph group_glyphs["Glyph Collections"]
  node_glyph_sources["Icon Glyph Sets"]
  node_glyph_scripts["Glyph Info Tools"]
  node_codicons_gen["Codicons Generator<br/>[generate_i_cod.py]"]
  node_original_gen["Original Glyph Font"]
  node_extraglyph_gen["Extra Glyph Font"]
end

subgraph group_catalog["Font Catalog"]
  node_font_families[("Patched Families")]
end

subgraph group_internal["Font Processing"]
  node_name_parser["Font Name Parser<br/>[FontnameParser.py]"]
  node_name_tools["Name Parsing Tools<br/>[FontnameTools.py]"]
end

node_font_user(("Font User"))
node_custom_font["Input Font"]
node_font_installer(("Font Installer"))

node_font_user -->|"provides font"| node_custom_font
node_font_user -->|"runs patcher"| node_font_patcher
node_custom_font -->|"patches font"| node_font_patcher
node_glyph_sources -->|"supplies glyphs"| node_font_patcher
node_font_patcher -->|"produces font"| node_patched_result
node_glyph_scripts -->|"reads glyph font"| node_glyph_sources
node_codicons_gen -->|"writes glyph metadata"| node_glyph_sources
node_original_gen -->|"generates glyph font"| node_glyph_sources
node_extraglyph_gen -->|"generates extra glyphs"| node_glyph_sources
node_name_parser -->|"uses parsing tools"| node_name_tools
node_font_installer -->|"runs installer"| node_install
node_install -->|"installs fonts"| node_font_families
node_font_families -->|"provides downloads"| node_font_user

click node_font_patcher "https://github.com/ryanoasis/nerd-fonts/blob/master/font-patcher"
click node_glyph_sources "https://github.com/ryanoasis/nerd-fonts/tree/master/src/glyphs"
click node_glyph_scripts "https://github.com/ryanoasis/nerd-fonts/blob/master/bin/scripts/generate-glyph-info-from-set.py"
click node_codicons_gen "https://github.com/ryanoasis/nerd-fonts/blob/master/src/glyphs/codicons/generate_i_cod.py"
click node_original_gen "https://github.com/ryanoasis/nerd-fonts/blob/master/bin/scripts/generate-original-source.py"
click node_extraglyph_gen "https://github.com/ryanoasis/nerd-fonts/blob/master/bin/scripts/generate-extraglyphs.py"
click node_name_parser "https://github.com/ryanoasis/nerd-fonts/blob/master/bin/scripts/name_parser/FontnameParser.py"
click node_name_tools "https://github.com/ryanoasis/nerd-fonts/blob/master/bin/scripts/name_parser/FontnameTools.py"
click node_font_families "https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts"
click node_install "https://github.com/ryanoasis/nerd-fonts/blob/master/install.sh"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_install,node_font_user toneBlue
class node_font_patcher,node_patched_result toneAmber
class node_glyph_sources,node_glyph_scripts,node_codicons_gen,node_original_gen,node_extraglyph_gen toneMint
class node_font_families toneRose
class node_name_parser,node_name_tools,node_custom_font,node_font_installer toneIndigo
```

## Components

### Font Usage

- [Install Script](https://github.com/ryanoasis/nerd-fonts/blob/master/install.sh): `install.sh`

### Patching

- [Font Patcher](https://github.com/ryanoasis/nerd-fonts/blob/master/font-patcher): `font-patcher`
- **Patched Font**

### Glyph Collections

- [Icon Glyph Sets](https://github.com/ryanoasis/nerd-fonts/tree/master/src/glyphs): `src/glyphs`
- [Glyph Info Tools](https://github.com/ryanoasis/nerd-fonts/blob/master/bin/scripts/generate-glyph-info-from-set.py): `bin/scripts/generate-glyph-info-from-set.py`
- [Codicons Generator](https://github.com/ryanoasis/nerd-fonts/blob/master/src/glyphs/codicons/generate_i_cod.py): `src/glyphs/codicons/generate_i_cod.py`
- [Original Glyph Font](https://github.com/ryanoasis/nerd-fonts/blob/master/bin/scripts/generate-original-source.py): `bin/scripts/generate-original-source.py`
- [Extra Glyph Font](https://github.com/ryanoasis/nerd-fonts/blob/master/bin/scripts/generate-extraglyphs.py): `bin/scripts/generate-extraglyphs.py`

### Font Catalog

- [Patched Families](https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts): `patched-fonts`

### Font Processing

- [Font Name Parser](https://github.com/ryanoasis/nerd-fonts/blob/master/bin/scripts/name_parser/FontnameParser.py): `bin/scripts/name_parser/FontnameParser.py`
- [Name Parsing Tools](https://github.com/ryanoasis/nerd-fonts/blob/master/bin/scripts/name_parser/FontnameTools.py): `bin/scripts/name_parser/FontnameTools.py`

### Other components

- **Font User**
- **Input Font**
- **Font Installer**

## Connections

- Font User → Input Font: provides font
- Font User → Font Patcher: runs patcher
- Input Font → Font Patcher: patches font
- Icon Glyph Sets → Font Patcher: supplies glyphs
- Font Patcher → Patched Font: produces font
- Glyph Info Tools → Icon Glyph Sets: reads glyph font (evidence: `bin/scripts/generate-glyph-info-from-set.py`)
- Codicons Generator → Icon Glyph Sets: writes glyph metadata (evidence: `src/glyphs/codicons/generate_i_cod.py`)
- Original Glyph Font → Icon Glyph Sets: generates glyph font (evidence: `bin/scripts/generate-original-source.py`)
- Extra Glyph Font → Icon Glyph Sets: generates extra glyphs (evidence: `bin/scripts/generate-extraglyphs.py`)
- Font Name Parser → Name Parsing Tools: uses parsing tools (evidence: `bin/scripts/name_parser/FontnameParser.py`)
- Font Installer → Install Script: runs installer
- Install Script → Patched Families: installs fonts
- Patched Families → Font User: provides downloads
