2
0
This commit is contained in:
2026-03-30 20:24:06 +09:00
parent af1e2e1414
commit c25e8902a0
2 changed files with 13 additions and 1 deletions

View File

@@ -11,7 +11,7 @@ if not os.path.exists(meslo):
# download SVG icons
base = "https://git.syui.ai/ai/app/raw/branch/main/icon"
for name in ["ai.svg", "syui.svg"]:
for name in ["ai.svg", "syui.svg", "bluesky.svg"]:
subprocess.run(["curl", "-sL", "-o", f"/tmp/{name}", f"{base}/{name}"], check=True)
subprocess.run(["fontforge", "-script", "/dev/stdin"], input=b"""
@@ -20,12 +20,22 @@ import fontforge
icons = fontforge.font()
icons.em = 1024
scale = 200
glyph = icons.createChar(0xE001, "ai")
glyph.importOutlines("/tmp/ai.svg")
bb = glyph.boundingBox()
glyph.transform((scale/100.0, 0, 0, scale/100.0, 0, 0))
glyph.width = 1024
glyph = icons.createChar(0xE002, "syui")
glyph.importOutlines("/tmp/syui.svg")
glyph.transform((scale/100.0, 0, 0, scale/100.0, 0, 0))
glyph.width = 1024
glyph = icons.createChar(0xE003, "bluesky")
glyph.importOutlines("/tmp/bluesky.svg")
glyph.transform((scale/100.0, 0, 0, scale/100.0, 0, 0))
glyph.width = 1024
icons.generate("/tmp/icons.ttf")
@@ -36,6 +46,8 @@ font.selection.select(0xE001)
font.clear()
font.selection.select(0xE002)
font.clear()
font.selection.select(0xE003)
font.clear()
font.selection.none()
font.mergeFonts("/tmp/icons.ttf")