This package is used to write justified text to images.
Project description
Justipy
This package allows you to draw justified text to images.
Usage example:
from PIL import Image
from Justipy.Justipy import Justipy
longtext = "Lorem ipsum vehicula himenaeos turpis odio sollicitudin quis amet suspendisse nisl, libero taciti ante interdum sollicitudin vestibulum felis mi hac, egestas fames luctus turpis imperdiet consectetur est gravida sem. malesuada maecenas vivamus consectetur donec diam sapien, in erat curae phasellus potenti, sed primis velit sem cursus. molestie ultrices tempus arcu viverra eleifend primis malesuada convallis ante accumsan, pulvinar conubia mollis at pellentesque consectetur ut dapibus sagittis integer nam, tempus orci elementum curabitur id rhoncus tempus velit elit. mollis vestibulum curabitur laoreet augue faucibus nullam a amet justo lorem, varius placerat magna pulvinar aptent quis porttitor metus lacus, diam etiam auctor nulla sagittis metus urna phasellus vitae."
im = Image.new('RGB', (1000, 500))
jpy = Justipy(im,
longtext,
tl_corner = [100, 75],
max_width = 800,
fontsize = 24,
line_space = 32,
paragraph_spaces = 8,
font = 'calibri.ttf',
fontcolor = (255,255,255)).getImage()
jpy.show()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Justipy-0.0.4.tar.gz
(3.1 kB
view hashes)