# Spiro 0.01 release

## Primary tabs

147 posts / 0 new
Offline
Joined: 15 Feb 2004 - 3:49am
0

Great stuff, congrats! I see this as a better, more useful alternative to the sketch mode in Fontlab.

Offline
Joined: 17 Jan 2007 - 5:49am
0

Great stuff! Should speed up a 'start designing directly on the computer' sort of a work process. Will it be compatible with UFO's or Fontlab files?

Offline
Joined: 7 Feb 2007 - 10:21am
0

Great program. I did some quick sketching to figure out how it works. However on the Mac version I'm getting a few anomalies, though I'm not sure if it's Mac-specific or not (though they are pretty. They occur when I'm dragging points around, and and in drag randomly at certain points the design will "expload" into some of the forms you see below. If you need any help with the Mac OS X programming side I'd be willing to help out if you'd like.

«El futuro es una línea tan fina que apenas nos damos cuenta de pintarla nosotros mismos». (La Luz Oscura, por Javier Guerrero)

Offline
Joined: 3 May 2000 - 11:00am
0

hhp

Offline
Joined: 25 Sep 2006 - 2:15pm
0

I would so love to see Adobe license this stuff for Illustrator CS 5.

Offline
Joined: 10 Sep 2006 - 6:19pm
0

I've been using a somewhat different technique than what is described in the Fontforge/Spiro tutorial. It involves a lot of switching back and forth between Spiro and Bezier drawing modes. The knife tool behaves unpredictably and the alignment tools are disabled in Spiro mode. Since I build letters with a lot of cut-and-paste, that sort of behavior is a hindrance.

I suppose I should write my own tutorial once I figure out exactly what I'm doing.

Offline
Joined: 11 Apr 2008 - 6:33pm
0

I can't seem to get Spiro working with FontForge, either*...but is does work with Inkscape! I gotta say, this is seriously sweet. I'm doing my MFA thesis on type design for e-paper, and this is going to help a lot. Kudos!

*installed libspiro and everything, latest FontForge release, says it's not linked to Spiro. Whatever...using X11 apps with multiple windows in Mac OSX is a royal headache anyway.

Offline
Joined: 14 Feb 2007 - 1:47pm
0

@lunyboy & @derya: A windows version is very unlikely; grab a GNU/Linux Live CD and test it out that way :-)

@Daniel: If your developer friends are interested, please mail me (dave@lab6.com) as there are some other QT people I know interested in writing a new type design tool.

@Tim: You need to buy a bigger screen.

Offline
Joined: 10 Sep 2006 - 6:19pm
0

Hi! Just wanted to bump this up. I've been using Spiro drawing in FontForge for months now and it has proven an invaluable addition to the tool set. While there are some shortcomings under predictable conditions, I wouldn't think of going back to drawing letterforms with Beziers alone.

Offline
Joined: 10 Sep 2006 - 6:19pm
0

@ exfish: I had that problem with an earlier release, but it was cured on the next month's build. Make a note of the issue (specifying your system specs and OS version along with the FF build version) on the fontforge-devel mailing list and George will fix it, or at least tell you what to do.

Offline
Joined: 6 Apr 2010 - 12:37pm
0

Raph, it's very wonderful and thank you a lot for sharing this Spiro to us! I use FontForge e Inkscape.

But, Raph, I still have a doubt, is Spiro compatible with Inkscape 0.48 from Windows 7 and Ubuntu 10.10? If so, how do I put Spiro to Inkscape and FontForge?

So you didn't teach how to download and put this pack to these programs.

Thank you!

Kevin

Offline
Joined: 11 Apr 2008 - 6:33pm
0

I downloaded the Carbon ppedit app, but nothing seems to happen when I click anywhere on the screen. I tried opening a plate file from the command line and while the terminal window looked like it was logging my mouse actions, nothing was showing up in the drawing area. Am I being a total idiot and missing something obvious, or is there some bug in the app? I'm running Leopard on an intel Mac.

Offline
Joined: 8 Aug 2004 - 11:00am
0

Stay tuned...

Offline
Joined: 10 Sep 2006 - 6:19pm
0

Thanks, prokoudine, but that tip refers to Mac OSX 10.5 and up, while I'm running 10.4.11 (the old girl can't take more than that.)

Offline
Joined: 8 Aug 2004 - 11:00am
0

I haven't tested on Leopard - it's entirely possible that there is a bug. Unfortunately, I have very limited time to work on this now (I'm really trying to concentrate on finishing my PhD), so it'll have to wait a while unless somebody else wants to play with it.

In the meantime, you might want to try out an Inkscape dev build - that has Spiro integrated and is definitely more polished than the ppedit test app.

Offline
Joined: 1 Mar 2007 - 11:21am
0

Bumping up this thread again :)

Developement version of Inkscape supports Spiro as well now. It's implemented as a live path effect (that is, there is always a final bezier path in an SVG file) and can be applied to any bezier path or be drawn with a pen or pencil tool. It will be available in final Inkscape 0.47 release (due this autumn probably).

Here is an illustration by Andy Fitzsimon:

http://www.flickr.com/photos/andyfitz/2566789269/

Offline
Joined: 10 Sep 2006 - 6:19pm
0

George Williams has extended FontForge to support Raph Levien’s Spiro curves. I started a thread here on Typophile to discuss that, but it hasn't drawn much attention yet. Anybody have any thoughts to share?

Offline
Joined: 8 Jun 2010 - 11:45am
0

Sorry to bump this old thread, but is there something new happening with Spiro? Has development stopped? It looked promising…

Offline
Joined: 1 Mar 2007 - 11:21am
0
Offline
Joined: 14 Feb 2007 - 1:47pm
0
Offline
Joined: 10 Sep 2006 - 6:19pm
0

Sorry about the threadjack, folks. Back on topic: Spiro sure is awesome, isn't it? Thanks Raph!

Offline
Joined: 28 Sep 2004 - 9:15am
0

Does anyone know how to pan or zoom in Spiro? I managed to open some of the sample files in the Mac version but I cannot see the whole glyph shape. Thanks!

Offline
Joined: 10 Sep 2006 - 6:19pm
0

Thanks for the tip, Alexandre. Hopefully that new version of Inkscape will work on my Mac, since the last one I tried won't launch. Probably something messed up in my system.

Offline
Joined: 14 Feb 2009 - 11:09am
0

Hello Raph,
I'm little bit confused by FontForge's tutorial on Spiro's http://fontforge.sourceforge.net/editspiro.html.
I also compiled the ppedit. But there's no tutorials/docs.
Is the only way for me to understand these 6 operations is actually to read the code?
Thanks.

Offline
Joined: 1 Mar 2006 - 11:44pm
0

Congratulations on your release, Raph! Good luck with writing your dissertation---I look forward to reading the math behind these curves.

You might also want to mention on your web page that ppedit compiles on Linux (and from looking at the Makefile, probably Windows, too). For those who don't want to compile ppedit to try it themselves, let me describe the basics:

Curves are drawn with curve, corner, and tangent points as normal, but there are only on-curve points---no off-curve points. The shape of the interpolated spline can be changed by adding more points to the curve and then moving them. Moving a point added to a Bezier curve is a pain, because then all of the off-curve control points have to be recalculated to make the curve smooth. However, Raph's program recalculates the spline to be smooth as you move the point (this is made easier by using the Cornu spirals, from my understanding), so that you always have a smooth curve. It's actually more intuitive than I thought it would be, but it still takes some getting used to.

Offline
Joined: 8 Aug 2004 - 11:00am
0

Thanks for all the positive feedback!

@guifa: if you want to try your hand at adding open/save dialogs, that would be appreciated (currently, Apple-S just saves into a file called "plate"). Just make sure any Mac-specific code is bracketed by #ifdef X3_CARBON, so it doesn't break the Linux build.

The solver is known not to be numerically stable when the angles get big. If you stick with small angles, those pretty but unuseful spirals won't happen. I'm working on a more stable solver, but it's not ready yet. This stuff is rocket science, literally - the math I'm using is based on the calculus of variations, which has applications in computing optimal trajectories for spacecraft.

@hrant: Inconsolata was designed entirely using these spirals, as was Christian Gothic and pretty much all of my work-in-progress for the last year or so. The .plate files for Inconsolata are all posted.

On the Mac, you can open a .plate file by going to the directory containing ppedit.app, and typing "./ppedit.app/Contents/MacOS/ppedit u.plate". Obviously, a real Open dialog would be much more useful.

@sgh: the Windows port is started, but far from complete. I probably won't finish it myself, because I've lately become more interested in porting the code to a web app.

@clauses: I'm not able (due to time constraints) to do any of that kind of integration work myself, but would be happy to help others do so. In the case of Fontlab compatibility, for you to be able to edit interactively inside the app, they'd probably need to license the technology. A plug-in or a batch-mode converter could probably be done as a separate module, though, which would be compatible with the free GPL licensing terms.

And there's been talk of using the UFO format as a container for the curves, similar to the .plate file but in XML. (It's said that XML is for people who feel that Lisp doesn't have enough parentheses).

@jpad: I would love that, of course.

Because I'm starting at Google in a couple weeks, I won't be beating the bushes myself to push this technology out into the world. To a large extent, I'm "throwing the technology over the fence." It's an opportunity to see what the community can do with it, both in the free software world (it's being demoed today at LGM in Montreal), and whether users can generate enough interest and excitement to spur proprietary vendors to pony up for a license. It is my experience that companies tend to be extremely reluctant to do such things. I'd like to be proven wrong, but that's the main reason I'm taking a job in the advertising industry rather than trying to make a go on my own with technology licensing.

Offline
Joined: 25 Sep 2006 - 2:15pm
0

Well, I hope the people at inkscape see your work and consider adding it to theirs. Good luck at Google.

Offline
Joined: 29 Sep 2004 - 8:20pm
0

Hi @raph Thanks for the detailed answer.
Let me ask you something, Did you build the Nodebox Cornu extension or were the Nodebox guys? It would be amazing to be able to use different kinds of Spiro points there.
I want to make an ppedit alike editor with a tight grid.

About ppedit, after saving I can't find the plate file in OS X 10.7
Cheers,

Offline
Joined: 8 Jan 2010 - 12:11am
0

Stay tuned...

For a Windows version :)

Offline
Joined: 23 Nov 2009 - 8:42pm
0

I discovered this thread when seeking information about one of the earliest computer-based type design tools.

It was mentioned in a standard type design textbook, so I'm sure many here have seen it. A single Archimedian spiral was seen as sufficiently general that it was the only tool the system offered, playing the same role as Bezier curves in today's digital type formats.

Offline
Joined: 22 Apr 2008 - 5:06pm
0

Quadibloc, according to yester lore, the AM Varityper worked with this spiral thingy -- their salesman told me this so it must be true ;-)
If I had salvaged one of its 8" font disks I would have tried to see what sort of format its fonts were stored in. Oh, and if I could attach an 8" disk drive to my system, of course.

It Was 1989 ("my thoughts were short, my hair was long") and the bosses' son returned from the US of A with two "laser printers", one from HP and the other one from a small but determined firm called "Apple", sporting an actual programming language ("PostScript", I recall). Soon after that, we abandoned AM -- just like pretty much the rest of the typesetting world.

Offline
Joined: 29 Sep 2004 - 8:20pm
0

Raph thanks for the wonderful Spiro curves, I'm using a lot lately.

There is one simple curve I can't represent very well using Spiros in Fontforge
I've tried using fontforge.spiroLeft and fontforge.spiroRight to enter and exit curve but it doesnt seem to draw a perfect circle. It seems more like logarithmic curve.

Is there a way of drawing this curve using Spiros? Thanks

Offline
Joined: 3 May 2000 - 11:00am
0

I'm not a spiro expert by any means, but:
- Try putting an extra point in the middle.
- There's no such thing as a perfect circle, except the
actual circle equation; any other form of equation is
necessarily an approximation.

hhp

Offline
Joined: 27 Mar 2008 - 12:02pm
0

This is all very interesting, but not very new.

URW Ikarus, developed by Peter Karow, in 1973-74, used Hermite splines having the important property that all the control points lie on the outline itself.

You had a few more points on curve but the control was great.

But, today, designers prefer and have accepted the off-curve Bezier handles.

However, Ikarus plug-ins where very powerful.

For example, you could change "one" serif and have the program replace all the serifs throughout automatically.

Another plug-in would slant or "italicize" the glyphs and optically adjust the distortions based on the amount of angle, and so forth.

Very powerful plug-ins that made the type designers job simpler, saved time. But, in the end, the type designer had to fine-tune everything by eye.

Automation can only go so far.

It seems that everyone is looking for the "magic" tool. How can I draw an "S" really fast without too much difficulty.

How can I get the tool to create a font for me relatively quickly, so I can make and market more fonts quicker.

I'm sorry, but there are no shortcuts to good typography or good type design.

I'm sure the tools will continue to make improvements with time. That is the nature of technology.

But the ultimate tool is ones own knowledge, talent and craftsmanship that one brings to the table.

Everything else is just a tool to help us explore the possibilities. Just a tool.

Offline
Joined: 23 Nov 2009 - 8:42pm
0

I see that I missed a mention in this thread of the Purdy-McIntosh system; that might be what I was thinking of.

Offline
Joined: 3 May 2000 - 11:00am
0

> you could change "one" serif and have the program
> replace all the serifs throughout automatically.

Letraset FontStudio did this too, with Beziers.

> there are no shortcuts to good typography or good type design.

Yes there are. You just have to invent them and/or [know how to] use them.

hhp

Offline
Joined: 14 Feb 2007 - 1:47pm
0

@dimitre its in /tmp

Offline
Joined: 25 Sep 2006 - 2:15pm
0

I'm sorry, but there are no shortcuts to good typography or good type design.

You must be one of those people who can’t figure out how to install Robofab.

Offline
Joined: 19 Jul 2004 - 6:31pm
0

"I deliberately simplified the UI so there wouldn't be huge numbers of point types representing the different constraints"

How huge is that number of point types anyway?

Offline
Joined: 1 Mar 2006 - 11:44pm
0

dberlow: How huge is that number of point types anyway?

There are essentially 4 types of Spiro points:

1. corner points -- where the slopes and curvatures of the incoming and outgoing splines are unconstrained
2. G4 curve points -- continuous up to the fourth derivative
3. G2 curve points -- continuous up to the second derivative
4. constraint points -- used to connect a curved line to a straight one

More information can be found at libspiro, the Fontforge documentation, or Raph's thesis (see in particular page 121 {137 in pdf numbering}).

Offline
Joined: 1 Mar 2006 - 11:44pm
0

@raph: Christoph Knoth at ATypI suggested adding one more point type, which would be an extremum point - it would function similar to the curve point, but force the tangent to be a multiple of 90 degrees.

This would be fantastic! One of the difficulties I've had in using Spiro for type design is the lack of control over extrema. This is particularly troublesome when converting an existing design into outlines or trying to match specified metrics.

Offline
Joined: 1 Mar 2006 - 11:44pm
0

Raph,

I've been re-reading your thesis (wonderful, by the way!) to see how an extremum point would work. Following the table on page 121, I think the following might work for a point of fixed tangency:

\theta_l=\theta_r=fixed constant
\kappa_l=\kappa_r
\kappa'_l=\kappa'_r

These four conditions balance the four degrees of freedom a general Spiro segment has. Do these seem like the right conditions? I think it should be pretty straightforward to extend your solver to include this type of point.

Best wishes,
Stephen

Offline
Joined: 8 Aug 2004 - 11:00am
0

@dimitre: No, there's no easy way to do this in Spiro. The underlying math can do it, no problem, but I deliberately simplified the UI so there wouldn't be huge numbers of point types representing the different constraints. Christoph Knoth at ATypI suggested adding one more point type, which would be an extremum point - it would function similar to the curve point, but force the tangent to be a multiple of 90 degrees.

One way you _can_ do it is to set points 1 and 2 to be corner points, and put an additional point on the arc, but that doesn't guarantee continuity.

@Hrant Spiro can represent exact circles. Beziers can't, so in the conversion to Bezier you get an approximation, but of course it can be a highly precise approximation.

Offline
Joined: 7 Feb 2007 - 10:21am
0

I could see a lot of nice things that could be in an OS X specific build. I'll take a look at the code when I get a chance and see if there's a way I can convert (or maybe it's already being done) the drawing view into an NSView. Once that's done, it seems you basically have everything you need to make a really sharp looking Mac app.

And hrant: those are too letters ... for my ... uh... dingbat font.

«El futuro es una línea tan fina que apenas nos damos cuenta de pintarla nosotros mismos». (La Luz Oscura, por Javier Guerrero)

Offline
Joined: 17 Jan 2007 - 5:49am
0

Oh God I'd wish I could program. These new kinds of approaches to designing digital type on the terms of a digital process are needed. The way the hand could draw the 'right' curves on paper is lost in the Bézier approach. Combine what you are doing with something like Metafont and we would have something truly mindblowing. Ahh dreams.

Offline
Joined: 14 Feb 2007 - 1:47pm
0

@clauses: It is compatible with FontForge's SFD, and as Fontforge recently added python scripting and native UFO support, you should be able to pipe it through FontForge to UFO and to FontLab. Why you'd want FontLab at all is a mystery to me, though, since Spiro and FontForge is more than capable - just look at Inconsolata :-) Also, regarding MetaFont, I figure the way it goes directly from code to bitmaps is its biggest problem. If it went to (Spiro) outlines, that would allow a "dreamweaver" code/design view and workflow.

@guifa: Mac OS X only features would be a shame - I hope it will remain as cross platform as possible

@jpad: I was discussing Inkscape integration with the Inkscape developers at the LGM today and its definitely going in, although on a medium time frame - as part of the existing lib2geom efforts.

Offline
Joined: 7 Feb 2007 - 10:21am
0

I didn't mean OS X only features per se. Only that I think it would be possible to encapsulate the spiral view into an NSView, thus making it no different to Interface Builder than an NSTextField. Again, I've not had a look at the source yet (I do plan on it tho) and so I'm not sure how separate you've got the different parts of the app, although if you're heading off to Google I'd imagine it's nicely modularised.

There are menu options for changing betwixt corner and curve points, etc. With those hooks, it could definitely open up some interesting possibilities if it can be made into a framework, which would still (I'd think) remain quite platform independent as well as make it more accessible to other developers for any number of other applications besides just font-design. If I'm rambling a bit excuse me, it is cinco de mayo (well, now it's seis de mayo).

«El futuro es una línea tan fina que apenas nos damos cuenta de pintarla nosotros mismos». (La Luz Oscura, por Javier Guerrero)

Offline
Joined: 3 May 2000 - 11:00am
0

> Why you’d want FontLab at all is a mystery to me

Come on.

> regarding MetaFont, I figure the way it goes directly
> from code to bitmaps is its biggest problem.

It's not a problem if you see it for what it is: a combination of glyph descriptor and RIP. But a very real -and somewhat related- problem of Metafont is its foundation on the theory that letters should have skeletons. This is a naive, primitive and fatal fallacy, and one at the heart of chirography as well. It's the reason Computer Modern looks so crappy.

hhp

Offline
Joined: 8 Aug 2004 - 11:00am
0

@guifa: It's an HIView, which is almost the same thing as an NSView.

You'll find that the code is factored to be quite modular, but perhaps not quite in the way that you'd expect. Writing truly cross-platform apps is hard. If I didn't care about that, I'd have done this as a Cocoa app, in Objective C, using NIB's. As it is, the UI is built procedurally, and there's a layer (x3) which translates that into the code for Carbon or Gtk+2. (it could do Windows too; that's a Small Matter of Programming).

So, for example, the menu item for "delete point" is created thus:

 x3menuitem(menu, "Delete Point", "delp", "<cmd>d");

The point is that you don't have to do redo all the UI work for each platform. An earlier version (see carbon_main.c) did load a NIB, and that was ok, but I like it better the way it is now.

@abattis: It is compatible with FontForge’s SFD

Not really. There's a batch-mode converter that spits out .sfd files. It's certainly doable to write a batch-mode converter for (cubic Bezier flavor) UFO's, or whatever FontLab accepts most natively. Given that FontLab is Python-scriptable, it should also be quite feasible to write a non-interactive import plugin that can be selected from the UI. In other words, an "import spiro plate" menu item.

There are different levels of compatibility. Batch-mode conversion is the lowest, interactive editing with lossless round-trip is the highest. If people seriously want to use these tools in production, anything less than that is a time-waster.

And as for FontForge, it kinda works for me, but there are lots of features of FontLab I miss, like stroke offset that isn't horribly buggy, Python scripting, a sane UI for OpenType contextual programming, etc. I've also had to fix a few bugs in it. Fortunately, because I am a rocket scientist, I can do that, but for most type designers, I think the experience will be less than fulfilling.

@hrant: problem of Metafont is its foundation on the theory that letters should have skeletons.

Metafont doesn't force you into that mode. The Computer Modern fonts are all defined as strokes, but AMS Euler is done more or less using the same technology as Adobe Type 1. Of course, Euler doesn't have any of the optical scaling or variation features either.

@clauses: The real power of Spiro comes out when you combine the spline fitter with techniques for variation. I have some ideas on this, which I will write up soon. My experiments thus far have been very encouraging, suggesting that it will be much easier to use than Multiple Master technology. Here's an experiment I did with linear interpolation of the control points to blend a weight axis:

The advantage of this technique is that all of the blends are guaranteed to have smooth curvature too. Using Beziers, in the general case, there's no guarantee of smoothness of any kind.

Offline
Joined: 14 Feb 2007 - 1:47pm
0

@Raph: And as for FontForge, it kinda works for me, but there are lots of features of FontLab I miss, like stroke offset that isn’t horribly buggy, Python scripting, a sane UI for OpenType contextual programming

Python scripting got added to FontForge last week, along with a total rework of OpenType features and lookups.