flycutter-zfz / rfc2kindle

Automatically exported from code.google.com/p/rfc2kindle
0 stars 0 forks source link

Hardcoded font does not exist #4

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. start the program, it crashes.

What is the expected output? What do you see instead?
There is the following font hardcoded that does not exist on my system (:
/usr/share/cups/fonts/Courier-Bold

Having the font discovered would be great.
Changing it to "Monospace-Bold" worked. But have to test this first on the 
kindle to see how it looks.

What version of the product are you using? On what operating system?
Fedora 17

Please provide any additional information below.
Traceback (most recent call last):
  File "./rfc2mobi", line 21, in <module>
    from html import Html
  File "/home/baboo/programs/rfc2kindle-read-only/html.py", line 3, in <module>
    from image import createImage
  File "/home/baboo/programs/rfc2kindle-read-only/image.py", line 6, in <module>
    _default_font = ImageFont.truetype('/usr/share/cups/fonts/Courier-Bold', 18)
  File "/usr/lib64/python2.7/site-packages/PIL/ImageFont.py", line 218, in truetype
    return FreeTypeFont(filename, size, index, encoding)
  File "/usr/lib64/python2.7/site-packages/PIL/ImageFont.py", line 134, in __init__
    self.font = core.getfont(file, size, index, encoding)
IOError: cannot open resource

Original issue reported on code.google.com by maenusch...@gmail.com on 8 Jan 2013 at 1:21

GoogleCodeExporter commented 8 years ago
Same problem, ubuntu 12.04 LTS, solution do not work

Original comment by roberto....@gmail.com on 23 Jul 2013 at 9:12