Building a canvas on top of Robofab

41 views
Skip to first unread message

Adrien Tétar

unread,
Sep 17, 2014, 12:31:52 PM9/17/14
to rob...@googlegroups.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?

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?


Adrien Tétar

Tal Leming

unread,
Sep 18, 2014, 11:06:58 AM9/18/14
to rob...@googlegroups.com

On Sep 17, 2014, at 12:31 PM, Adrien Tétar <adri....@gmail.com> wrote:

> 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:

https://github.com/typesupply/defconAppKit

Tal

Adrien Tétar

unread,
Sep 19, 2014, 9:36:40 AM9/19/14
to rob...@googlegroups.com
Thanks, Tal – this helped me wrap my head around the relationships between the different libraries out there. It seems like robofab is what I want to use indeed.
Reply all
Reply to author
Forward
0 new messages