Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

The width of displayio text with proportionally spaced fonts
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

The width of displayio text with proportionally spaced fonts

by kevinjwalters on Mon Aug 03, 2020 8:20 am

The standard approach I've been using for calculating text width is length times width from get_bounding_box() for displayio fonts. That's fine for the mono-spaced terminalio.FONT. I just realised in answering Centre text string on TFTFeatherwing that it's only an approximation if the font is proportionally spaced. What's the solution for those fonts?

kevinjwalters
 
Posts: 739
Joined: Sun Oct 01, 2017 3:15 pm

Please be positive and constructive with your questions and comments.