img = Image.open(os.path.join(outDir, outFileName))
cw = ContourWriterAGG('/home/hu-mka/git/cyclonesatpy/cyclonesatpy/dev/shapefiles/')
font=aggdraw.Font('black', '/usr/share/fonts/truetype/ubuntu/Ubuntu-B.ttf',opacity=127, size=16)
cw.add_coastlines(img, areadef, resolution='l', level=4, outline=(255, 0, 0))
cw.add_grid(img, areadef, (2.0, 2.0), (1.0, 1.0), font, fill='blue',
outline = 'blue', minor_outline = 'blue')
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 FreeTypeFontTerveisin, Markus