Open paapu88 opened 3 years ago
If the aggdraw.Font
works for you, is there a reason you need to use the ImageFont.truetype
option?
The basic excuse on our end is that there are some incompatibilities between the old "PIL" based writer and the AGG-based writer. The AGG writer depends on "aggdraw" which is the real problem here as that library doesn't support PIL's ImageFont objects and pycoast does not currently have a way to wrap/workaround that (ex. convert ImageFont
objects from the user to Font
objects for aggdraw).
Hei, I'm fine now, but please remove ImageFont.truetype if you have it in the documentation (not sure that's the case) so other people will not waste their time (I wasted 15min of my precious time...). But really a great package!! Thanks! Markus
ImageFont.truetype if you have it in the documentation (not sure that's the case)
ImageFont objects can still be used with the PIL writer which is still available and used to be the default writer. If you aren't sure it is in the documentation, then where did you see that you should use it? Is there something that needs updating? Any help would be greatly appreciated.
Aa, it was here (first thing google gave me) https://github.com/pytroll/pycoast/blob/master/docs/source/graticule.rst
Dear Developers, I have Ubuntu 20.04 python 3.8.5 pycoast==1.4.0
I followed: https://github.com/pytroll/pycoast/blob/master/docs/source/graticule.rst
This did work fine:
But if i replace font by:
font = ImageFont.truetype('/usr/share/fonts/truetype/freefont/FreeSans.ttf', 16)
I get:TypeError: text() argument 2 must be Font, not FreeTypeFont
Terveisin, Markus