Hi all
I am creating a weather station on my inky WHAT screen, and I have an issue with the placement of the font image on screen.
I am using an open source font called weathericons-webfont that has images for each type of weather. So clouds, sun etc.
My code looks like this :
from PIL import Image, ImageFont, ImageDraw
weather_icons_font = ImageFont.truetype("./fonts/weathericons-regular-webfont.ttf",46,)
img = Image.new("P", inky_display.resolution)
canvas = ImageDraw.Draw(img)
canvas.text((5,0, "\uf042", inky_display.BLACK, font=weather_icons_font )
This will draw one of the icons on the inky screen just fine. The issue I have is that I set the X,Y to 5,0. That means the font should draw with 0 spacing towards the top of the screen. But what I am seeing is a gap between the top of the screen and the cloud image.
I am assuming there is some unseen whitespace around the font?
Anyone know how I can resolve this? I would like to have the font image as close to the top of the display as possible.
Thanks!