change font size to better accomotade smaller screens, probably should use dynamic size

This commit is contained in:
Cassiano Aquino 2019-09-25 18:41:51 +01:00
parent b5100c33c6
commit 0896548f13
No known key found for this signature in database
GPG Key ID: 2480258091054B09
2 changed files with 4 additions and 4 deletions

View File

@ -3,6 +3,6 @@ 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, 9)
BoldSmall = ImageFont.truetype("%s-Bold.ttf" % PATH, 8)
Medium = ImageFont.truetype("%s.ttf" % PATH, 10)
Huge = ImageFont.truetype("%s-Bold.ttf" % PATH, 30)
Huge = ImageFont.truetype("%s-Bold.ttf" % PATH, 25)

View File

@ -50,9 +50,9 @@ class View(object):
'friend_face': Text(value=None, position=(0, 90), font=fonts.Bold, color=BLACK),
'friend_name': Text(value=None, position=(40, 93), font=fonts.BoldSmall, color=BLACK),
'name': Text(value='%s>' % 'pwnagotchi', position=(int(self._width / 2), int(self._height * .15)), color=BLACK, font=fonts.Bold),
'name': Text(value='%s>' % 'pwnagotchi', position=(int(self._width / 2) - 5, int(self._height * .15)), color=BLACK, font=fonts.Bold),
# 'face2': Bitmap( '/root/pwnagotchi/data/images/face_happy.bmp', (0, 20)),
'status': Text(value=voice.default(), position=(int(self._width /2), int(self._height * .30)), color=BLACK, font=fonts.Medium),
'status': Text(value=voice.default(), position=(int(self._width /2) - 5, int(self._height * .30)), color=BLACK, font=fonts.Medium),
'shakes': LabeledValue(label='PWND ', value='0 (00)', color=BLACK, position=(0, self._height - int(self._height * .12) + 1), label_font=fonts.Bold,
text_font=fonts.Medium),