Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - simba741

Pages: [1]
1
Python / Text drawable starts with a box in front of the text
« on: August 29, 2020, 01:58:42 pm »
---
font = sf.Font.from_file(os.path.join(filepath, 'arial.ttf'))
text = sf.Text('Hello World')
text.character_size = 56
text.font = font
text.style =sf.Text.REGULAR
text.color  = sf.Color(160, 160, 160)

text.position = (10, 10)
sfWin.draw(text)
sfWin.display()
------
This segment of code will display a box (non printable character) at the beginning of the text. This code is run on Raspberry Pi 4, Ubuntu Mate 20.04. Please see the attachment.

Pages: [1]
anything