PMXBOT Log file Viewer

Help | Karma | Search:

#pil logs for Thursday the 19th of February, 2015

(Back to #pil overview) (Back to channel listing) (Animate logs)
[15:29:48] <Pykler> Having issue with ImageDraw.text ... I have a 300dpi png image, when I draw text on it I am getting a much smaller font size. Any idea how to fix that?
[15:33:15] <Pykler> the font is a ttf loaded with the truetype function with the size set in pts, but it seems the size is much smaller.
[15:39:34] <Pykler> Can I assume that the dpi for imageFont is 96 (and can it not be changed?)
[15:57:10] <Pykler> turns out the font dpi is 72
[15:57:16] <Pykler> so the image being 300 dpi
[15:57:45] <Pykler> the proper font size becomes, int(size * 300 / 72.0)
[15:59:25] <Pykler> or probably int(math.round(size * 300 / 72.0))
[16:07:16] <Pykler> Anybody know of a way to load the ttf font with a different DPI ?
[19:16:12] <Pykler> IS there a way to do ImageDraw.text at 300 dpi?!