Last active
October 31, 2021 14:21
-
-
Save borodean/b86fb59bafb5e4e82db0 to your computer and use it in GitHub Desktop.
FontForge Single Character Font
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # | |
| # fontforge -lang=py -script script.py | |
| import fontforge | |
| font = fontforge.font() | |
| font.encoding = 'UnicodeFull' | |
| font.design_size = 16 | |
| font.em = 2048 | |
| font.ascent = 1638 | |
| font.descent = 410 | |
| font.familyname = 'NotFound' | |
| font.fontname = 'NotFound' | |
| font.fullname = 'NotFound' | |
| font.autoWidth(0, 0, 2048) | |
| glyph = font.createChar(0x20) | |
| glyph.width = 569 | |
| for char in set(u'Страница не найдена').difference(' '): | |
| glyph = font.createChar(ord(char)) | |
| glyph.importOutlines('no-glyph.svg') | |
| glyph.left_side_bearing = glyph.right_side_bearing = 16 | |
| glyph.round() | |
| font.generate('build/NotFound.woff') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment