Single Stroke font ( like font for CNC / engraving )


#29

Eames, it looks like the paths in your example aren’t really open. I see a continuous loop without any endpoint. I never got a real font working in any common software (MacOS, Adobe…) because even if you leave open ends the type rendering part of the software always interprets it as a closed shape.

So if you draw the character ‘V’ as a single line going down and up again it would become something resembling a solid triangle V >> ▼

I did manage to get your example results with OTF fonts using Glyphs mini.


#30

Simply close all paths, perhaps with a script.

I don’t follow.

Yes, but what does the plotter do? Does it draw alongside these automatically closed paths or ignores them?


#31

For the project with the plotter I ended up not using OTF / Glyphs at all but writing my own font editor, font format and renderer. Typography was quite limited because of this. The font format I created was based on SVG and I didn’t implement kerning, ligatures and other nice typography features because I just didn’t have the time.
But I could use my open single stroke paths…


#32

But you wrote that you had OTF showing up in Ai and even plotter working as intended. I can’t get OTF to show up for some reason.

Single Stroke font ( like font for CNC / engraving )


#33

Ah yes, you need to export the OTF WITHOUT “Autohint all glyphs” or “Remove Overlap” enabled.


#34

But I did uncheck that and it still doesn’t work.


#35
  1. How do you test your font?
  2. What do you mean by ‘it does not work’? Does the font not show up in the font menu?

#36

It exports and shows up in the menu but letters are invisible in both Font Book and Illustrator. Unless it’s TTF, then it’s visible because open paths are still interpreted as closed. The downside is that spacing between letters gets messed up.


#37

The export to OTF ignores open paths.


#38

So what do I do?


#39

This may be a font cache problem. Read this please:
http://www.glyphsapp.com/tutorials/eliminating-font-cache-problems

Only use the Adobe Fonts folder:
http://www.glyphsapp.com/tutorials/testing-your-fonts-in-adobe-apps

Have you tried my suggestion from above?

Run this script in Macro window to close all paths:

for g in Font.glyphs:
	for l in g.layers:
		for p in l.paths:
			p.closed = True
  • Export without overlap removal, without hinting.
  • Export into the Adobe fonts folder (see above).
  • In AI, type your text, covert to outlines, and open the paths again by removing the closing segment, probably best with a script again, if you need to do it often.

#40

When I said that OTF is “invisible” in Ai, I meant that shapes themselves are invisible due to open paths.

With paths closed, OTF is visible in Ai but pats are obviously closed, so that no good since I basically need to somehow make an engraving (non-looping path) font for the plotter. They want to pull tons of name data from the website, put it into Indesign, select the font, convert into PDF and “write” using a plotter. Manually opening paths would be impossible task. Worst case scenario – write everything in Glyphs, export to PDF and use that…


#41

You can automate the (re-) opening of paths in Ai. Ai path items have a closed property. You could control that with a little JavaScript.

Does it have to be Ai/InD? There used to be a special engraving software that would take OTFs without subroutines and with a different suffix, and it would leave out the closepath statement when interpreting the paths. Should be mentioned somewhere in the depths of the forum archives.

Edit: Here is AppleScript code that opens every selected path in Adobe Illustrator. Feel free to adapt it to your needs. I guess that something similar is possible in InDesign:

tell application "Adobe Illustrator"
	tell document 1 -- frontmost document
		set numberOfPaths to count path items
		repeat with i from 1 to numberOfPaths
			set thisPathItem to path item i
			if selected of thisPathItem then
				set closed of thisPathItem to false
			end if
		end repeat
	end tell
end tell

#42

No, it doesn’t have to be Ai. They will use Id to compile/arrange the text, then send it as vector PDF to InkScape, which then will be drawed with AxiDraw (as I understood).

I found this page with some good info. By “temporary closing paths” they mean closing on export as with your Python script? Then using other script to reopen? But how will that last script know which nodes to cut?


#43

It does not need to; it just removes the closepath instruction at the end. Please read this post from further above to understand what closepath means:


#44

A different solution would be so use drawbot to make the pdf. Then you have full control over the paths. And drawbot can be easily automated.


#45

Hello, I’m new to Glyphs and am trying to do a similar thing with single strokes but primarily for aesthetic purposes (wanting a very thin, hairline font). Is there an easy way to make this change universally (making a new node 100 units above all else and then closing paths) for all characters in a font? I have figured out how to do it for individual paths but it is very tedious.


#46

Hi @bluedog:
Where do you want to use it? In AI? Please try the suggestion from above:

  1. close all paths in Glyphs (with the script from above)
  2. export without removing overlap
  3. opening the paths in Illustrator (with the AppleScript from above)

Then you do not need to add any points.


#47

Thanks—I will try the script above, but I want to be able to use this font as a standard OTF in Word and other applications as well as Illustrator. The glyphs I have drawn are very intricate with many intersecting paths, and when I tried closing the paths previously (and exporting without removing overlap), it resulted in incorrect closures, sort of like the example above:

So I want to be sure that when I close the paths, it is just making a very thin shadow/double of the glyph and closing the nodes that way rather than closing paths the default way, and I do not want to have to do an extra step of re-opening paths in the application where I am typing. Thus I thought the solution of moving all nodes up slightly and then closing would be the best solution. I appreciate your help.


#48

Nevermind, I think I’ve figured it out—I outlined strokes in Illustrator, set the stroke to zero pt, and then copied the paths into Glyphs, and now upon export (after fixing compatibility and unchecking “Remove Overlap”) it is looking fine. Thank you!