Fix formatting of lib/extract_emoji.py

pull/1062/head
Igor Chubin 1 month ago
parent 85ba61f37b
commit 6f1bfc16a6

@ -37,9 +37,17 @@ EMOJIS = [
"", "",
"", "",
"☁️", "☁️",
"🌑", "🌒", "🌓", "🌔", "🌕", "🌖", "🌗", "🌘" "🌑",
"🌒",
"🌓",
"🌔",
"🌕",
"🌖",
"🌗",
"🌘",
] ]
def extract_emojis_to_directory(dirname): def extract_emojis_to_directory(dirname):
""" """
Extract emoji from an emoji font, to separate files. Extract emoji from an emoji font, to separate files.
@ -51,12 +59,19 @@ def extract_emojis_to_directory(dirname):
for emoji in EMOJIS: for emoji in EMOJIS:
filename = "%s/%s.png" % (dirname, emoji) filename = "%s/%s.png" % (dirname, emoji)
convert_string = [ convert_string = [
"convert", "-background", "black", "-size", "%sx%s" % (emoji_size, emoji_size), "convert",
"-set", "colorspace", "sRGB", "-background",
"pango:<span font=\"%s\" size=\"20000\">%s</span>" % (emoji_font, emoji), "black",
filename "-size",
"%sx%s" % (emoji_size, emoji_size),
"-set",
"colorspace",
"sRGB",
'pango:<span font="%s" size="20000">%s</span>' % (emoji_font, emoji),
filename,
] ]
subprocess.Popen(convert_string) subprocess.Popen(convert_string)
if __name__ == '__main__':
if __name__ == "__main__":
extract_emojis_to_directory("share/emoji") extract_emojis_to_directory("share/emoji")

Loading…
Cancel
Save