There is an example code using freetype in cairo cookbook we are using in PyChess to render different chess figurines from truetype chess font files. (http://cairographics.org/freetypepython/) It worked ok with older cairo/pycairo versions, but newer cairo versions (1.12.x) fails to render some of them (not all!). No error message, just empty draws. One example .ttf is here: http://code.google.com/p/pychess/source/browse/pieces/ttf/harlequin.ttf The demonstrating code using this .ttf is here: http://code.google.com/p/pychess/source/browse/lib/pychess/System/cairoextras.py Original pychess bugreport with screenshot: http://code.google.com/p/pychess/issues/detail?id=708
This looks like a ctypes usage problem and not a pycairo bug. The ctypes code uses the pycairo, cairo and freetype application binary interfaces. The pycairo ABI sometimes changes when a new version of pycairo is released. If you examine the ctypes code you will probably find something that worked with an old version of pycairo which is now incorrect for the current pycairo version. If you check through the ctypes code and reduce the problem to a pure pycairo test case which shows the bug, I'll be happy to look at it.
(In reply to comment #1) > This looks like a ctypes usage problem and not a pycairo bug. > > The ctypes code uses the pycairo, cairo and freetype application binary > interfaces. The pycairo ABI sometimes changes when a new version of pycairo is > released. If you examine the ctypes code you will probably find something that > worked with an old version of pycairo which is now incorrect for the current > pycairo version. > > If you check through the ctypes code and reduce the problem to a pure pycairo > test case which shows the bug, I'll be happy to look at it. As I described before, it works OK with some other .ttf piece sets. I think the bug related to https://bugs.freedesktop.org/show_bug.cgi?id=50688. I opened the harlequine.ttf with fontforge in Debian Sid, and checked in Has Vertical Metrics checkbox, then generated a new .ttf. And it worked!
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.