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.
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.