Your code runs without error for me, I'm guessing that your gd c-lib was built without TrueType Font support. You could try installing the latest GD c -lib from GD c-lib , building it with TTF support, then rebuild the Perl module. See GD with TTF support, it says you need the FreeType 2.x library.