ginga: aggdraw cannot load font (no text renderer)
@ejeschke , are you familiar with this error? What dependency am I missing here? I was attempting to initialize EnhancedCanvasView
from jupyterw
on Jupyter Lab. Problem is this is a new installation of Miniconda3, so while this used to work in the old installation, it does not anymore.
2018-06-29 15:46:06,431 | E | ImageView.py:1272 (redraw_now) | Error redrawing image: cannot load font (no text renderer)
2018-06-29 15:46:06,434 | E | ImageView.py:1277 (redraw_now) | Traceback:
File "...\ginga\ImageView.py", line 1258, in redraw_now
self.redraw_data(whence=whence)
File "...\ginga\ImageView.py", line 1303, in redraw_data
self.private_canvas.draw(self)
File "...\ginga\canvas\DrawingMixin.py", line 723, in draw
super(DrawingMixin, self).draw(viewer)
File "...\ginga\canvas\CompoundMixin.py", line 143, in draw
obj.draw(viewer)
File "...\ginga\canvas\types\basic.py", line 86, in draw
cr.set_font_from_shape(self)
File "...\ginga\aggw\CanvasRenderAgg.py", line 56, in set_font_from_shape
alpha=alpha)
File "...\ginga\aggw\AggHelp.py", line 77, in get_font
font = get_cached_font(name, size, color, op)
File "...\ginga\aggw\AggHelp.py", line 22, in get_cached_font
font = agg.Font(color, info.font_path, size=fontsize, opacity=alpha)
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 18 (7 by maintainers)
@ejeschke and @pllim I mentioned this in the related aggdraw issue, but if you have ideas for a fallback for finding freetype libraries that doesn’t include the freetype-config command, let me know. Previously aggdraw used to have a hardcoded path and after I took over the project I included the functionality from someone else for using
freetype-config --prefix
. It seems that freetype on conda-forge does not include this binary command so aggdraw can’t be built with it. There seems to be an issue for this (see reference above) on the freetype feedstock.Pinning
conda install aggdraw=1.3.5
worked. AndFREETYPE_ROOT
problem has disappeared. Thank you very much!It is available on windows but you may have to force the version since i think it pinned itself to a newer version of freetype and conda is trying not to update/downgrade things if it doesn’t have to. @ocefpaf may know more.
This might be an issue for the aggdraw module rather than ginga.
Yes, it requires more intervention to install aggdraw. Also, I think the package has been mostly abandoned by the original author. There are several forks on github, including mine. I’ve fixed a few bugs and added python3 support.
It does nice antialiased drawing, so I think the results are maybe a little better than pillow, but difficult to install on non-linux platforms. Perhaps the freetype configuration could be improved…