On Sep 17, 2014, at 12:31 PM, Adrien Tétar <adri....@gmail.com
> Hello all,
> I would like to build up a basic canvas to display glyphs using QT.
> I’m only getting started with Robofab but it looks like it can run both with a dependency to a program and standalone.
> Could someone possibly explain me more in-depth how this interfacing occurs?
It all depends on what you want to do. If you only want to display glyphs that are coming from an OpenType font, you don’t need RoboFab as FontTools has everything you need. If you want to display glyphs from UFOs you’ll need RoboFab for it’s ufoLib and glifLib for loading. You can use the objects in objectsRF or the objects in my defcon package to handle the interpretation of the loaded data. The glyph objects in both of those have draw methods that follow the pen protocol.
> Regarding QT, I see that e.g. RoboFab has drawing pens but QT also has some along with its canvas API. How would I link them? Any pointers?
Look at FontTools’ CocoaPen for an example. That implements the standard pen protocol but internally it adapts and passes the commands to an instance of NSBezierPath. You might also want to look at my defconAppKit package for some examples of how this has been done in the past. These are all for Cocoa but the principles might be helpful: