Add new icons to the GitLens GL Icons font
/add-icon [icon-name]
icon-name — kebab-case (e.g., my-new-icon)Place in images/icons/{icon-name}.svg
Requirements:
viewBox="0 0 16 16")<style> tags or fontsfill="currentColor" for color inheritanceAppend to images/icons/template/mapping.json:
"icon-name": {next-available-code-point}
Code points are in the Private Use Area range (57344-63743). Check existing entries for next available.
pnpm run icons:svgo # Optimize SVGs
pnpm run build:icons # Generate font (runs svgo + fantasticon + apply + export)
Copy the new glicons.woff2?{hash} URL from src/webviews/apps/shared/glicons.scss and search-replace the old URL across the codebase.
In Lit components:
import { glIcon } from '../shared/components/icons.js';
html`${glIcon('my-new-icon')}`;
In CSS:
.my-element::before {
font-family: 'glicons';
content: '\{codepoint}';
}
pnpm run build:icons<style> tags, use fill="currentColor"