Jump to content
tcarisland

Can I export glyphs faster than this?

Recommended Posts

I've been messing around with designing fonts in Affinity Designer, then exporting the individual glyphs and importing them into FontForge.

 

Doing this I've come across some annoying monkey work that I really wish had a more automated solution.

 

From the Affinity Designer side of the process I find that the most tiresome process is exporting the individual curves.

 

post-3142-0-28246000-1490141452_thumb.png

 

My process is that I create a folder for each type of characters such as.

  • Minuscules (lower case letters)
  • Majuscules (upper case letters)
  • Digits
  • Punctuation
  • Ligatures

Then place the curves in a 1024 X 1024 (or 1000 X 1000) artboard, all centered using the "Align -> Center" and place them according to the baseline.

 

There's a video here showing part of my process:

 

 

[media][/media]

 

https://www.youtube.com/watch?v=9bzXDf8rQwg&t=73s

 

What I would like to be able to do is export each individual curve as it is placed on the art board as an svg file so the curve named "A" exports as "A.svg" in that folder and "B" as "B.svg" etc...

 

Is there a faster way to do this?

Share this post


Link to post
Share on other sites
Is there a faster way to do this?

 

 

Not that I am aware of. How well does copy/paste work with FF? (Or, does it even work properly between the two?)


My computer is a nothing-special Toshiba laptop with unremarkable specs running Windows 10 64-bit.

Share this post


Link to post
Share on other sites

The thing is, exporting slices with the export persona exports the curves, but without the necessary whitespace around it, screwing it up with the baseline and size.

 

Copying and pasting directly imports it as if it's importing a raster image, and doesn't import the actual vector coordinates like it does when I import it from an svg.

 

FontForge has python scripting so I might find a way to automate that process myself, but Affinity Designer seems to lack macros or "actions" like Photoshop has, so I'd like to find a way to do this using the export persona or something similar.

Share this post


Link to post
Share on other sites

The thing is, exporting slices with the export persona exports the curves, but without the necessary whitespace around it, screwing it up with the baseline and size.

 

Could you perhaps work around that by applying a thin stroke around the edge of the 1024 x 1024 (or 1000 x 1000) square, so that each glyph is like a Scrabble tile, and then remove the border in FontForge? :unsure:


Alfred online2long.gif
Affinity Designer 1.6.5.123 • Affinity Photo 1.6.5.123 • Windows 10 Home (4th gen Core i3 CPU)
Affinity Photo for iPad 1.6.8.77 • Affinity Designer for iPad 1.6.1.40 • iOS 11.4.1 (iPad Air 2)

Share this post


Link to post
Share on other sites

Really, it is only scripting that could make sense of the exporting as regards time savings.

 

How about making the proper-size artboards for each glyph as you are designing? Guidelines for the baselines, x-height, cap-height, LSB/RSB, that sort of thing. Then at least the position would be proper (evidently...maybe. I don't use FF anymore than I have to).

 

There is a method from InkScape -> FontForge, though. Got 13 minutes?

 

https://www.youtube.com/watch?v=QP20E7fr_YQ

 

Mike


My computer is a nothing-special Toshiba laptop with unremarkable specs running Windows 10 64-bit.

Share this post


Link to post
Share on other sites

Could you perhaps work around that by applying a thin stroke around the edge of the 1024 x 1024 (or 1000 x 1000) square, so that each glyph is like a Scrabble tile, and then remove the border in FontForge?  :unsure:

 

I thought of that as well, this requires me to group the curve with a rectangle the size of the artboard and remove that rectangle for each individual glyph in FontForge. The reason why I'm using Affinity Designer is to avoid as much vector graphics editing in FontForge because their editor is pretty bad.

 

I've looked at Inkscape, but I try and avoid that one too.

 

Maybe I should try and suggest this as a feature request, exporting individual curves as they are placed in the artboard should be useful for a lot of applications as well, such as web or gui-design.

 

I found one possible solution though. Since SVG is text I found that the two SVG files differ in that the "viewbox" is different, maybe I should write a simple program to iterate through the files in that directory and change the viewbox of every file. Changing the viewbox aligns the curve to the left of the document, but FontForge has a nice "Center in Width" function that can be applied to multiple glyphs at a time.

 

post-3142-0-72940500-1490143278_thumb.png

Share this post


Link to post
Share on other sites

I fear you will, sooner or later, run into another issue when using Affinity Designer for creating glyphs. At the moment, you cannot snap off-curve control nodes to the grid in Affinity Designer, so these nodes will be grid-aligned (“quantized”) by your font creation application either on import or at least as soon as your font is exported. This will inevitably distort your glyph contours (or at least the ones that are controlled by off-curve points) to a smaller or greater degree …  :(

Share this post


Link to post
Share on other sites

I fear you will, sooner or later, run into another issue when using Affinity Designer for creating glyphs. At the moment, you cannot snap off-curve control nodes to the grid in Affinity Designer, so these nodes will be grid-aligned (“quantized”) by your font creation application either on import or at least as soon as your font is exported. This will inevitably distort your glyph contours (or at least the ones that are controlled by off-curve points) to a smaller or greater degree …  :(

 

I know, I've been annoyed by the inability to snap control nodes to the grid for some time, not just for glyphs though, for anything really.

Share this post


Link to post
Share on other sites

I suggested the ability to snap control nodes to grid in the feature request forum, no response though. Doesn't seem to be much interest, I'm guessing some of my suggestions might seem too technical or too specific.

Share this post


Link to post
Share on other sites

As regards font design, I don't believe this would ensure valid curves nor consistent design.

 

As for general design, I also don't believe it would aid me. It is still a valid request.


My computer is a nothing-special Toshiba laptop with unremarkable specs running Windows 10 64-bit.

Share this post


Link to post
Share on other sites

As regards font design, I don't believe this would ensure valid curves nor consistent design.

 

Well, then it is obviously nonsense what font designers all around the world do in Illustrator …  ;)

post-1198-0-55802900-1490343735_thumb.png

Share this post


Link to post
Share on other sites

Fractional coordinates are allowed in OpenType fonts these days. I forget what FL5 does with them in its latest/last revision, though.

 

But rounding the coordinates of a letter that is roughly 12 points in size that has roughly 500 to 1000 whole coordinates in its width and more in its height is hardly an issue.


My computer is a nothing-special Toshiba laptop with unremarkable specs running Windows 10 64-bit.

Share this post


Link to post
Share on other sites

Well, that depends on the viewpoint, I would say. I know quite a few type designers who would argue differently. But anyway, what would be undoubtedly important for creating glyphs in Affinity Designer is the option of constraining the orientation of Bézier handles vertically or horizontally – or rather, the option of making them snap back to a horizontal or vertical orientation, once they have been moved in another direction, accidentally or not. Unless this is possible, you won’t be able to successfully create glyph shapes in Designer …  :(

Share this post


Link to post
Share on other sites

Define "successfully."

 

Because most of what you wrote is incorrect.


My computer is a nothing-special Toshiba laptop with unremarkable specs running Windows 10 64-bit.

Share this post


Link to post
Share on other sites

Hi Mike,

 

what precisely do you consider “incorrect”?  :unsure:

 

Maybe something was lost in translation, so please let me apologize if that should have been the case. Anyway, let me try to explain what I meant to say in a different way. As you will know, it is common practice in glyph design to place nodes at the extremes of the curve that defines a glyph shape. And it is also common practice to make sure that the Bézier handles are either vertical or horizontal in such cases: vertical, if the node defines a “left” or “right” extreme of the curve, horizontal, if the node defines a “top” or “bottom” one. Fontlab will create these nodes even automatically, if you let the built-in algorithm “optimize” your curves.

 

Now, have a look at Affinity Designer. While you can initially, viz. when creating a node with the Pen Tool, constrain the Bézier handles to stay vertical or horizontal by holding down the Shift modifier, there is no modifier key in Designer that will allow you to snap the Bézier handles back to a vertical or horizontal position, as soon as you set them to an angle of, say, fourty-three degrees by using the Node Tool. Such a displacement might have been an accident, but it can happen. This missing feature has been covered in several threads, for instance in these ones:

 

https://forum.affinity.serif.com/index.php?/topic/16951-snapping-handles-to-verticalhorizontal-of-their-anchor-point/

https://forum.affinity.serif.com/index.php?/topic/21186-horizontal-vertical-bezier-handles/

https://forum.affinity.serif.com/index.php?/topic/8813-adjusting-bezier-handles-and-wont-snap-to-pure-vertical-or-horizontal/

 

I just checked the last version of Designer, and it seems this feature has not been implemented yet. So I am not sure, what precisely was “incorrect” in my earlier remark. Either you want to dispute my premises, viz. my opinions about nodes at extremes, or you found a way to constrain the movement of Bézier handles … maybe I have overlooked something … if so, I would be happy indeed … hmm …  :unsure:

 

Cheers, Alex  :)

post-1198-0-31034500-1490396736_thumb.png

Share this post


Link to post
Share on other sites
Fontlab will create these nodes even automatically, if you let the built-in algorithm “optimize” your curves.

 

 

Hello Alex,

 

How would a computer algorithm (that works) do anything but that behavior?

 

In any case, I do think we are talking at cross-purposes. We evidently have a fundamental difference as to what Successful means. Which would have been nice for you to explicitly define. Gawd knows I'm slow on the uptake sometimes.

 

Best regards, Mike


My computer is a nothing-special Toshiba laptop with unremarkable specs running Windows 10 64-bit.

Share this post


Link to post
Share on other sites

Hey Mike,

 

I fear I should have better used the word “effortless” …  :(

 

Let me say so. If I decided to use Affinity Designer for the creation of anything that is intended for import in a font design application, I would like to be able to set up my Affinity Designer document in a way that I don’t have to perform any optimizations to my curves in the target application afterwards.

 

More precisely, I would like to use the font design application simply to determine the font metrics, set the Open Type rules etc. and to compile the font file afterwards. However, I would not want to add nodes at extremes, correct the curves because of rounding issues, in short, I would not want to work on the glyph shapes themselves. Such operations on the glyph shapes would be “additional efforts” in my eyes, for I would not see any benefit in making the roundtrip to Designer then. I could simply use the drawing capabilities of my font design application.

 

So you are definitely right, one can “sucessfully” create glyph shapes in Affinity Designer, but I would doubt this can be done “effortlessly” or “economically” at the moment … at least it would require a lot of discipline in using Designer …  :unsure:

 

Hope that makes sense,

Alex

Share this post


Link to post
Share on other sites

The extraneous node problem caused by expanding the stroke and boolean operations, not to mention the generally buggy way the boolean operations work made it really difficult for me to create an "extruded font" yesterday.

 

I've reported the problem before, but it doesn't seem to be a priority.

 

I also asked for the ability to move objects at a specified angle without response a couple of months ago, I know how to do this mathematically, but would prefer not having to whip out a calculator for something so easy to program.

 

I don't mean to sound overly pessimistic, but yesterday I was forced to use Illustrator on a pretty slow Laptop because AD doesn't:

 

Expand strokes well enough

Boolean tools are buggy and

No numerical "move by" option.

 

I'd rather use AD for everything if I could, but expanding strokes and union, add and intersection are pretty much "bread and butter" for vector graphics.

Share this post


Link to post
Share on other sites

+1 

 

Word has it, the snap to grid feat for handles should arrive with 1.7.

 

The most critical issue IMO is the expansion of strokes, however. I haven't found a palatable workaround for it so I've had no choice but to resort to Inkscape for the expansion and then import the expanded stuff back into AD. To me, the expanding of a stroke is as bread and butter as it gets with vector GFX so I really, really hope it's being worked on behind the scenes.

 

I haven't encountered any problems with the boolean tools.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×