change font size to better accomotade smaller screens, probably should use dynamic size
This commit is contained in:
parent
b5100c33c6
commit
0896548f13
@ -3,6 +3,6 @@ from PIL import ImageFont
|
|||||||
PATH = '/usr/share/fonts/truetype/dejavu/DejaVuSansMono'
|
PATH = '/usr/share/fonts/truetype/dejavu/DejaVuSansMono'
|
||||||
|
|
||||||
Bold = ImageFont.truetype("%s-Bold.ttf" % PATH, 10)
|
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)
|
Medium = ImageFont.truetype("%s.ttf" % PATH, 10)
|
||||||
Huge = ImageFont.truetype("%s-Bold.ttf" % PATH, 30)
|
Huge = ImageFont.truetype("%s-Bold.ttf" % PATH, 25)
|
||||||
|
@ -50,9 +50,9 @@ class View(object):
|
|||||||
'friend_face': Text(value=None, position=(0, 90), font=fonts.Bold, color=BLACK),
|
'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),
|
'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)),
|
# '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,
|
'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),
|
text_font=fonts.Medium),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user