How to draw text based on pixel height? #8737
-
I figured maintainers know a thing or two about texts and fonts. I'm trying to draw text on a 1920x1080 image with a given pixel height. This pixel height is from the top pixel in the line of text to the bottom pixel in the line of text. How do I efficiently convert the pixel height to a font size to draw in that area (top - bottom)? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
https://app.uxcel.com/courses/design-lingo/typography-605/font-size-2298
So my expectation is that they would be the same. If you find otherwise, I suspect you're not considering ascenders and descenders. I don't think this is a Skia question yet - if you had just kept this as a generic question about fonts, I would have presumed that you were still using Pillow. As a general rule though, it would be helpful if questions and problems posted here were kept to Pillow-related ones. This is partly for other users, so that when they search for information, they don't find unrelated content. It is also partly for those of us who answer questions - there already isn't enough time available to address Pillow matters without increasing scope. |
Beta Was this translation helpful? Give feedback.
https://app.uxcel.com/courses/design-lingo/typography-605/font-size-2298
So my expectation is that they would be the same. If you find otherwise, I suspect you're not considering ascenders and descenders.
I don't think this is a…