Individual glyph contours hierarchy in Fontlab

Vít Šmejkal's picture

Hello everyone,

I'm working on rather experimental font - each glyph consists of many horizontal stripes (individual paths/contours)

Is there any way to re-arrange thier hierarchy/order?

For exmple the top contour would be #1 and the last one #23 ? (or otherwise)

I've figured out how to display their numbers (ctrl + F7) but how to change their order?

Thumby and time consuming solution would be probably "cut and paste" in the right order but I'm looking for something more effective.

Any help appreciated,
(v)

Grzegorz Rolek's picture

In the mode you’ve probably been already, the one you set the starting points from, right-clicking on each contour should give you a contextual menu with some very basic contour-ordering commands. But it won’t be very effective either. I haven’t done much FontLab scripting in particular, but looking at your contours, just finding the lowest y coordinate in each contour and sorting the contours by this value should do, algorithmically.

Is there a reason why do you want them sorted? Because the only reason I myself can think of is the file size, as the bigger the distances between points, the bigger the numbers that need to be stored. In case of a TrueType binary, for example, the threshold is at 256 font units, above which storage requirements for a particular distance double, but that’s still mere two bytes. Machine movement of some kind?

Vít Šmejkal's picture

Thank you, Grzegorz,
The right-click menu helps :)

It involves some clicking, but it's working fine.
I'm not experienced in scripting at all, luckily the number of glyphs in my font is not that high.

The whole sorting "problem" is probably not that big deal - I was rather concerned about potential interpolating issues.

Thanks,
(v)

.00's picture

removed

Frode Bo Helland's picture

In Glyphs > CMD+Shift+R

By the way, it looks awesome!

Syndicate content Syndicate content