PiSupply / PaPiRus

Resources for PaPiRus ePaper eInk displays
https://www.pi-supply.com/product/papirus-epaper-eink-screen-hat-for-raspberry-pi/
Other
346 stars 88 forks source link

papirus-write not working as expected #4

Closed gocyclic249 closed 8 years ago

gocyclic249 commented 8 years ago

Writing to Papirus....... Traceback (most recent call last): File "papirus-write", line 73, in main() File "papirus-write", line 33, in main write_text(papirus, args.content, args.fsize) File "papirus-write", line 45, in write_text font = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', size) File "/usr/lib/python2.7/dist-packages/PIL/ImageFont.py", line 240, in truetype return FreeTypeFont(font, size, index, encoding) File "/usr/lib/python2.7/dist-packages/PIL/ImageFont.py", line 137, in init self.font = core.getfont(font, size, index, encoding) IOError: cannot open resource

gocyclic249 commented 8 years ago

I fixed this. The font variable in papirus-write was not pointing to the correct directory

shawaj commented 8 years ago

Do you have the details of the correct directory and we will push it into the next update?

Thanks On 24 Jan 2016 6:44 p.m., "gocyclic249" notifications@github.com wrote:

I fixed this. The font variable in papirus-write was not pointing to the correct directory

— Reply to this email directly or view it on GitHub https://github.com/PiSupply/PaPiRus/issues/4#issuecomment-174328788.

gocyclic249 commented 8 years ago

I added the freefont from debian repository an changed the following line in papirus-write

font = ImageFont.truetype('/usr/share/fonts/truetype/freefont/FreeMono.ttf', size)

shawaj commented 8 years ago

What don't did you have to add and using what command? Just so we can replicate the fix exactly.

Thanks On 24 Jan 2016 9:13 p.m., "gocyclic249" notifications@github.com wrote:

I added the freefont from debian repository an changed the following line in papirus-write

font = ImageFont.truetype('/usr/share/fonts/truetype/freefont/FreeMono.ttf', size)

— Reply to this email directly or view it on GitHub https://github.com/PiSupply/PaPiRus/issues/4#issuecomment-174342074.

chrisrichards commented 8 years ago

Just created PR #5 which fixes this, and a couple of other things

shawaj commented 8 years ago

This should be fixed now :-)