Jump to content
You must now use your email address to sign in [click for more info] ×

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?

Link to comment
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.

Link to comment
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 spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.4.1 (iPad 7th gen)

Link to comment
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

Link to comment
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

Link to comment
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 …  :(

Link to comment
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.

Link to comment
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.

Link to comment
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 …  :(

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
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.

Link to comment
Share on other sites

  • 1 year later...

+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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.