I'm developing on an embedded device using OpenWRT. Whenever I try to use fswebcam to capture and image from my /dev/video0 and want to add some text to the image (--info switch), I get this error.
So the standard font 'luxisr' doesn't work. I've tried supplying my own .ttf font. Same result. Is there a font that fswebcam will be able to use without changing my current install, i.e. current libgd build? I'm thinking that including freetype font support in libgd, rebuilding and re-installing will be non-trivial (why wouldn't they enable it by default then).
Thanks for any help on this...
UPDATE [march 31st, 2011]: I've posed this question to Philip Heron, the author of fswebcam. This morning he let me know that:
fswebcam right now can only use TTF fonts, and relies on freetype support in libgd to be able to render them. There's two options:
Rebuild libgd with freetype support. I'm not familiar with the OpenWRT build system but this might be the easiest option. Freetype seems to be packaged already so it shouldn't be too painful.
libgd also has a simple bitmap font built-in. I could have fswebcam fall back on this if no freetype support is detected, but it won't look nearly as good.
-Phil
So I'm going ahead and willbe re/cross-compiling libgd with freetype support.
What you can do is:
[buildroot_DIR]/package/feeds/packages/gd/Makefile
and set line --without-freetype
to
--with-freetype=$(STAGING_DIR)/usr
Then get a copy of the desired ttf (e.g. ubuntu /usr/share/fonts/truetype/freefont/FreeSans.ttf)
export GDFONTPATH