question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

aggdraw cannot load font (no text renderer)

See original GitHub issue

@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)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:18 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
djhoesecommented, Jul 24, 2018

@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.

1reaction
pllimcommented, Aug 22, 2018

Pinning conda install aggdraw=1.3.5 worked. And FREETYPE_ROOT problem has disappeared. Thank you very much!

Read more comments on GitHub >

github_iconTop Results From Across the Web

aggdraw cannot load font (no text renderer) - Stack Overflow
The problem was with my FREETYPE_ROOT . Line 32 of aggdraw's setup.py should be as follows: FREETYPE_ROOT = "/usr/local".
Read more >
Developers - aggdraw does not some to be able to find fonts when ...
aggdraw does not some to be able to find fonts when installed in a venv.
Read more >
aggdraw 1.3.8 documentation
The AggDraw library provides a python interface on top of the AGG library. ... Create a font object from a truetype font file...
Read more >
[Rdkit-discuss] 2D image issues - rdkit-discuss@lists.sourceforge.net
IOError : cannot load font (no text renderer). I believe that this problem occurs when aggdraw (and probably PIL) are built without freetype2...
Read more >
using aggdraw with Python 2.5 [Archive] - FedoraForum.org
I have a toolkit that uses aggdraw to generate graphic files. On various systems, it seems to work fine ... IOError: cannot load...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found