This page is a contributor guide for adding new glyphs to the Seti and Original icon set — the SVG-sourced icon set that is the only one in this repository built from raw SVG files. The full pipeline goes from SVG source → icons.tsv → original-source.otf → patched fonts.
For information about the existing icon sets and their codepoint ranges, see Icon Sets. For how glyph shell variable files like i_seti.sh work and are consumed by the patcher, see Glyph Definitions.
The Seti and Original icon set is unique among Nerd Fonts glyph sources: rather than tracking an upstream font binary, it is built from individual .svg files checked into the repository. All other icon sets (Font Awesome, Devicons, Octicons, etc.) are tracked as pre-built .otf/.ttf files directly in src/glyphs/.
Pipeline: SVG source glyphs → font binary
Sources: src/svgs/README.md bin/scripts/generate-original-source.py1-30
Place the new SVG file in src/svgs/. Two naming conventions apply depending on the icon's origin:
| Origin | Naming convention | Example |
|---|---|---|
| Original / custom (not from Seti-UI) | Append _nf suffix | zsh_nf.svg |
| Seti-UI upstream | No suffix | rust.svg |
This naming distinction exists to avoid collisions between the two sources, as noted in src/svgs/README.md
SVG constraints:
[53, 0, 947, 900] in font units (see dBB in addIcon, bin/scripts/generate-original-source.py105). Any aspect ratio is handled automatically.simplify-path optimization via optimize-original-source.sh. Be aware that path complexity will be reduced.importOutlines call (bin/scripts/generate-original-source.py108) will silently fail on malformed files.icons.tsvsrc/svgs/icons.tsv is the authoritative mapping file that controls codepoint assignment, glyph names, and file associations. It is read by generate-original-source.py at bin/scripts/generate-original-source.py157
File format (tab-separated):
# comment lines start with #
# offset<TAB>name<TAB>filename.svg
offset name_in_i_seti_sh filename.svg
start_codepoint (0xE4FA). Offsets must be kept consecutive with no gaps.i_seti.sh. Must match [a-zA-Z0-9_] only; invalid characters are replaced with _ by the script..svg file in src/svgs/. Omit this field on alias lines (see below).Concrete example from icons.tsv:
191 i_custom_zsh zsh_nf.svg
This assigns zsh_nf.svg to offset 191 (codepoint 0xE4FA + 191 = 0xE5B9). After the codepoint_shift of 0x0100, the final codepoint in patched fonts is 0xE6B9.
An alias is an additional name for the same glyph at the same offset. Add a new line with the same offset number, a different name, and no filename:
191 i_custom_zsh zsh_nf.svg
191 i_seti_zsh
The addLineToData function (bin/scripts/generate-original-source.py49-61) appends the new name to the existing codepoint's name list rather than creating a duplicate entry.
| Variable | Value | Description |
|---|---|---|
start_codepoint | 0xE4FA | First codepoint in original-source.otf |
end_codepoint | 0xE5FF | Last permitted codepoint (262 slots total) |
codepoint_shift | 0x0100 | Shift applied by font-patcher during patching |
The generator will exit(1) if any entry falls outside [start_codepoint, end_codepoint] (bin/scripts/generate-original-source.py161-163). As of the current icons.tsv, offsets go up to 191, leaving approximately 70 slots free.
Sources: src/svgs/icons.tsv1-14 bin/scripts/generate-original-source.py17-26 bin/scripts/generate-original-source.py49-89
generate-original-source.pyFrom the src/svgs/ directory:
python3 ../../bin/scripts/generate-original-source.py
The script is configured with relative path constants at the top (bin/scripts/generate-original-source.py21-27):
| Variable | Value | Purpose |
|---|---|---|
vector_datafile | icons.tsv | Glyph database |
vectorsdir | ../../src/svgs | SVG source directory |
fontfile | original-source.otf | Output font file |
fontdir | ../../src/glyphs | Output font directory |
glyphsetfile | i_seti.sh | Output shell variable file |
glyphsetsdir | lib | Output directory for shell variable file (relative to script) |
What the script does:
The output i_seti.sh is autogenerated — do not edit it manually. It will contain one shell variable assignment per glyph at the shifted codepoints.
Sources: bin/scripts/generate-original-source.py103-119 bin/scripts/generate-original-source.py121-132 bin/scripts/generate-original-source.py135-179
optimize-original-source.shThis script runs Inkscape's path simplification on SVGs in src/svgs/. It is automatically triggered by CI on every push, but should also be run locally before committing:
bash bin/scripts/optimize-original-source.sh
Be aware that Inkscape simplify-path is destructive: it modifies the SVG geometry in-place. Review the diff of your SVG after running this. The CI will apply this automatically for pull requests, as described in src/svgs/README.md
After running generate-original-source.py, verify:
src/glyphs/original-source.otf has been regenerated (check file modification time).bin/scripts/lib/i_seti.sh contains a new variable for your glyph name.Gap at offset N warnings — these indicate non-consecutive offsets in icons.tsv.FATAL: We are leaving the allocated codepoint range error.The hasGaps function (bin/scripts/generate-original-source.py28-34) checks for discontinuities in the assigned codepoints and prints a warning if any exist.
font-patcherThe regenerated original-source.otf is already referenced in font-patcher's patch_set under the "Seti-UI + Custom" entry. No changes to font-patcher are required when adding glyphs to the existing SVG icon set, because the patcher reads the font file at patching time.
Data flow from SVGs to a patched font:
Sources: bin/scripts/generate-original-source.py17-19 bin/scripts/generate-original-source.py170-178
To add an entirely new external icon font (e.g., a new upstream icon font shipped as a .otf or .ttf):
src/glyphs/.src/glyphs/README.md with the upstream source, version, and license.font-patcher's patch_set list, specifying the font file, codepoint range, and any scaling parameters.i_<name>.sh shell variable file in bin/scripts/lib/ mapping each codepoint to a shell variable name.bin/scripts/lib/i_all.sh to source the new file.This process is analogous to how Font Awesome, Devicons, Octicons, and similar sets are integrated. See Glyph Definitions and Icon Sets for the complete details on i_*.sh files and existing patch_set entries.
Sources: src/glyphs/README.md1-28
When a pull request includes changes to src/svgs/, the CI pipeline:
optimize-original-source.sh (Inkscape path simplification).generate-original-source.py to rebuild original-source.otf and i_seti.sh.This means contributors do not need to run generate-original-source.py locally, but running it locally allows validation before pushing. See Development Workflow for details on the full CI pipeline.
Sources: src/svgs/README.md11-13
Refresh this wiki
This wiki was recently refreshed. Please wait 3 days to refresh again.