pytroll / pytroll/aggdraw

aggdraw does not some to be able to find fonts when installed in a venv

Open
#74 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
107
Forks
45
Avg merge
13h 41m
Merged PRs (30d)
7

Description

Minimal steps to reproduce (on Ubuntu 21.04, Python 3.9):

in terminal

% python -m venv aggdrawtest
% source  aggdrawtest/bin/activate
% pip install aggdraw
% python

in python:

>>> import aggdraw
>>> aggdraw.Font('black', '/usr/share/fonts/truetype/open-sans/OpenSans-Regular.ttf')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: cannot load font (no text renderer)

By contrast, if I do sudo apt install python3-aggdraw I see this in python:

>>> import aggdraw
>>> aggdraw.Font('black', '/usr/share/fonts/truetype/open-sans/OpenSans-Regular.ttf')
<Font object at 0x7f3847abcd10>

Clearly something is going wrong in the venv install. Any ideas?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Ubuntu 21.04 virtualenv commands and compare the pip installation with the apt-installed package. Inspect the package's build and dependency configuration for the missing text-renderer support; done means aggdraw.Font loads the same font successfully in a venv installation.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.