diff --git a/aifont.py b/aifont.py index 6bd0eed..5898faa 100755 --- a/aifont.py +++ b/aifont.py @@ -35,7 +35,12 @@ 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)) +# center vertically: move to baseline +bb = glyph.boundingBox() +yshift = -bb[1] # move bottom to y=0 +glyph.transform((1, 0, 0, 1, 0, yshift)) +s = scale / 100.0 +glyph.transform((s, 0, 0, s, 0, 0)) glyph.width = 1024 icons.generate("/tmp/icons.ttf") diff --git a/aifont.ttf b/aifont.ttf index 1c5460f..2b3a5e7 100644 Binary files a/aifont.ttf and b/aifont.ttf differ