mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
misc: refactored code to work as a setup.py based package
Signed-off-by: Simone Margaritelli <evilsocket@gmail.com>
This commit is contained in:
16
pwnagotchi/ui/fonts.py
Normal file
16
pwnagotchi/ui/fonts.py
Normal file
@ -0,0 +1,16 @@
|
||||
from PIL import ImageFont
|
||||
|
||||
PATH = '/usr/share/fonts/truetype/dejavu/DejaVuSansMono'
|
||||
|
||||
Bold = ImageFont.truetype("%s-Bold.ttf" % PATH, 10)
|
||||
BoldSmall = ImageFont.truetype("%s-Bold.ttf" % PATH, 8)
|
||||
Medium = ImageFont.truetype("%s.ttf" % PATH, 10)
|
||||
Huge = ImageFont.truetype("%s-Bold.ttf" % PATH, 25)
|
||||
|
||||
|
||||
def setup(bold, bold_small, medium, huge):
|
||||
global PATH, Bold, BoldSmall, Medium, Huge
|
||||
Bold = ImageFont.truetype("%s-Bold.ttf" % PATH, bold)
|
||||
BoldSmall = ImageFont.truetype("%s-Bold.ttf" % PATH, bold_small)
|
||||
Medium = ImageFont.truetype("%s.ttf" % PATH, medium)
|
||||
Huge = ImageFont.truetype("%s-Bold.ttf" % PATH, huge)
|
||||
Reference in New Issue
Block a user