micropython-font-to-py icon indicating copy to clipboard operation
micropython-font-to-py copied to clipboard

freetype not found

Open ironsightdesign opened this issue 1 year ago • 2 comments

Not sure this is the best place for this question, but trying to use font_to_py.py to convert a font and getting "font_to_py requires the freetype library" even though I've done brew install freetype multiple times.

Not finding anyway to get pip to work and brew list shows freetype. Maybe font_to_py doesnt like where brew puts the library?

Any ideas?

ironsightdesign avatar Jun 10 '24 18:06 ironsightdesign

I'm sorry but I have no experience of the Mac. I do know that Mac users have run font-to-py successfully. Does pip or pip3 not work on the Mac?

peterhinch avatar Jun 11 '24 18:06 peterhinch

I have the same issue. Any ideas?

python3 font_to_py.py FreeSans.ttf 20 freesans20.py
font_to_py requires the freetype library. Please see FONT_TO_PY.md.

which python3
/opt/homebrew/bin/python3

pip install freetype-py
Requirement already satisfied: freetype-py in /opt/homebrew/lib/python3.11/site-packages (1.2)

The answer is here: https://apple.stackexchange.com/questions/471270/python-doesnt-see-package-installed-by-brew

Install a venv, activate it and install freetype-py into it.

adrianblakey avatar Dec 09 '24 13:12 adrianblakey