First commit
This commit is contained in:
commit
530b15914e
16
.editorconfig
Normal file
16
.editorconfig
Normal file
@ -0,0 +1,16 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.py]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
icons/
|
||||
*.ttf
|
24
LICENSE
Normal file
24
LICENSE
Normal file
@ -0,0 +1,24 @@
|
||||
This is free and unencumbered software released into the public domain.
|
||||
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
distribute this software, either in source code form or as a compiled
|
||||
binary, for any purpose, commercial or non-commercial, and by any
|
||||
means.
|
||||
|
||||
In jurisdictions that recognize copyright laws, the author or authors
|
||||
of this software dedicate any and all copyright interest in the
|
||||
software to the public domain. We make this dedication for the benefit
|
||||
of the public at large and to the detriment of our heirs and
|
||||
successors. We intend this dedication to be an overt act of
|
||||
relinquishment in perpetuity of all present and future rights to this
|
||||
software under copyright law.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
For more information, please refer to <http://unlicense.org>
|
3
make-font.sh
Executable file
3
make-font.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
fontforge -script scripts/generate.py
|
3
pyproject.toml
Normal file
3
pyproject.toml
Normal file
@ -0,0 +1,3 @@
|
||||
[tool.black]
|
||||
skip-string-normalization = true
|
||||
line-length = 100
|
33
scripts/generate.py
Normal file
33
scripts/generate.py
Normal file
@ -0,0 +1,33 @@
|
||||
import string
|
||||
import glob
|
||||
import csv
|
||||
import fontforge
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
letters = string.ascii_letters
|
||||
letters += string.digits
|
||||
# letters += string.punctuation
|
||||
# letters += 'абвгдеёжзийклмнопрстуфхцчшщъыьэюя'
|
||||
# letters += 'АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ'
|
||||
|
||||
files = glob.glob('icons/*.svg')
|
||||
|
||||
font = fontforge.font()
|
||||
font.encoding = 'UnicodeBMP'
|
||||
font.familyname = 'Feather'
|
||||
|
||||
icon_index = 0
|
||||
for letter in letters:
|
||||
if icon_index < len(files):
|
||||
print(letter, '\t', files[icon_index])
|
||||
|
||||
glyph = font.createMappedChar(letter)
|
||||
# glyph = font.createChar(int(letter, 16))
|
||||
glyph.importOutlines(files[icon_index])
|
||||
# print(symbol[0], files[icon_index])
|
||||
icon_index += 1
|
||||
|
||||
font.generate('testfont.ttf')
|
||||
|
||||
print('Total icons:', len(letters))
|
Loading…
Reference in New Issue
Block a user