IndyFont: InDesign to Font Demo

Theunis de Jong's picture

Yesterday I introduced "IndyFont" to the InDesign community, there might be some interested parties over here as well, both in practical use as in technical details :-)

IndyFont is a Javascript that runs under InDesign CS4 and newer, on both Mac OSX and Windows, and which converts vector art in an InDesign document to an OpenType font.
The prime target audience is Your Average InDesign User, desperately in need of a quick bullet, logo, or accented glyph. As such, operation has deliberatly been kept simple: run the script once, and it will create a template to draw your character(s) in. Run it again, and it will convert the artwork to a font, which you then can save in InDesign's own Fonts folder (enabling it only in ID itself), or anywhere else.

The free demo converts only one character; a full version is still somewhat of a Work in Progress, and will be a commercial product. The demo is downloadable from my site: indyfont_demo.zip. Unpack, move to your Scripts folder, double-click in the Scripts panel to run.

Technical information:
The script scans [Black] colored vector art, merging separate objects where necessary, and converts the resulting paths to OpenType Type 1 Charstrings. These are then dumped to a file, including all of the necessary OTF scaffolding.
The script contains the full Adobe Glyph names set per 2007, with the exclusion of the quite useless hundred-or-so Box Drawing glyphs, and the inclusion of the strangely missing "minussuperior". The name "Omega" is in this system mapped to U+2126.
Unicodes can also be assigned individually, and will then be validated against the set of 220 Unicode ranges per 14-Jun-2011 specs -- theoretically, it should be impossible to assign an invalid Unicode.
The given Font name is scanned for hints such as "Bold", "Italic", "Condensed", and "Expanded" (the full list of recognized font variants is longer), and usWeightClass, usWidthClass, as well as fsSelection/macStyle bits, are set to match. Thus, if you generate several fonts with the same base name but with different styles, software such as InDesign itself can sort the styles correctly.

Two fairly important things are missing: hinting (it's not too glaringly obvious for the occasional bullet or logo, but fonts intended for plain text suffer, of course), and kerning (the current input structure doesn't lend itself for easy input of kerning values).

riccard0's picture

Very interesting!
(now I just need to get past ID CS3 ;-)

Theunis de Jong's picture

Riccardo, ouch! The script doesn't really use any advanced features of InDesign itself, so theoretically the basic functionality might work under '3! But the interface dialogs are built with ScriptUI, and if I remember correctly, that was not yet available in CS3.

.. I don't have a working CS3 anymore, so unfortunately I can't check ..

ralf h.'s picture

I am always getting "There is no artwork in any of these outlines."
How do I tell it, what my character should be?

Theunis de Jong's picture

Are you using only default [Black] fills to draw with?
(It does not work with other colors, as the concept of "color" does not apply. Rather than treating *every* color as a Fill (which would also include yellow and white ...), I only have it pick up actual default [Black].)

Unfortunately, you cannot use stroked line art either. Illustrator lacks many useful functions from InDesign, but at least it has an "expand stroke" option for lines. I had a stab at coding line-to-filled-object but that actually turned out to be harder than creating an OpenType font ...

ralf h.'s picture

Does it really look for the specific name [black]? Because in my German version that color is called [Schwarz] and I cannot change that. Maybe that's the reason?

Theunis de Jong's picture

Uh. From what I've understood on localized vsns of ID, that should not be an issue ... (I'm gonna verify this asap.)

Another thing: artwork should be on the layer "Outlines". It's selected by default when you create a new template, but maybe you clicked around a bit? :)

ralf h.'s picture

Checked the layers. No, that's not it.

Theunis de Jong's picture

Possibly I have been working so long on this project, maybe I was overseeing the obvious ... Are you drawing on the first page, the one that contains general font info? Each character gets a full page of its own; if you accept the defaults, the only other page created is titled "/bullet". And that's the next page, as seen from the initial view :-P
(I've already been advised having a manual would be nice ...)

I temporarily switched my CS4 to German, and, as I was told, "Black" as well as a small set of other built-in names don't need to be translated:

ralf h.'s picture

Right. That was it. Never occurred to me to look for another page.
How is the outline conversion done? Doesn't seem to be taken over directly. :-(

Other than that, amazing idea and tool!

Theunis de Jong's picture

Native line art in InDesign is internally drawn as a subset of PostScript like commands (and thus translate *very* easy to PDF). Unfortunately, the Javascript interface translates it back into a dumb series of vertex points, including some pretty freaky conversion of perfectly okay Bezier curves to 'left, anchor, right' point sets. Those need to be converted back into proper Beziers, as the output format I'm using is Type 1.
On top of that, the internal vertices are all in full floating point format. Since most font rendering software is "not there yet", I round off the vertices to integer points.
So your delicate details may get lost in translation ...

Nevertheless: one of the nicer surprises is that Mac OS X is smart enough to allow real-time updating of fonts even when you already used it. That means you can preview your design in a live document! (One of the nastier surprises, on the other hand, was that Windows is not as forgiving and puts a File Lock on the font as soon as you use it anywhere, so you cannot overwrite or update it without quitting InDesign.)

ralf h.'s picture

After I finally got it working, I got the word out:
http://opentype.info/blog/2012/06/27/logo-font-indesign/
http://www.typografie.info/2/content.php/369-IndyFont

Too bad, the Bezier curves cannot be pushed to the font directly.

Theunis de Jong's picture

Thank you for that great review!

You can somewhat lessen the rounding effects you are seeing by enabling Document Grid (IndyFont already sets the grid at "10 points with 10 subdivisions" for that) and switching "Snap To Document Grid On".

The rounding effects are more visible when using Bezier control curves because each end point is rounded separately from its (presumably) mirrored counterpart. I did a brief experiment to see if it was possible to round one end, then extrapolate this adjusted direction to its counterpart and find the nearest integer values for that one. But that wasn't detectably better :(

I think this could be why Adam is hesitant to allow fractional coordinates in FontLab by default. The end result might be slightly better for the tiniest of curves, but the font is not going to be compatible with "older" font engines (i.e., about anything on the market right now), and a straight conversion to integer points will reveal the same problems I got.

By the way, how did I ever come up with this idea? From reading Typophile of course!
A funny story. I came across an older thread discussing Apple's Emoji font and I thought I might expand my own 'read_otf' software to see if it was possible to fish out interesting data from it. While rewriting, it occurred to me I knew a fair lot of the OpenType font format and it sounded like a fun project to try creating a font through ID. Well, (1) I found had to learn quite a bit more about OTF -- evidence is lingering in a couple of threads where I needed additional clarification --, and (2) I still haven't got round to examining Apple's Emoji font!
(Hmmm ... creating an Opentype bitmap font, straight out of Photoshop -- possible?)

hrant's picture

I had missed this - cool and interesting!

I only have CS2 on my "native" system. Hopeless?

hhp

Theunis de Jong's picture

Sorry, hrant, it is. IF needs CS4 and upwards (with CC still a hit-n-miss gamble).

It's not so much the logic in my own code that needs such-and-such version, but all the little differences in the scripting interface really add up over ID's versions.

hrant's picture

What about the Adobe cloud situation?

hhp

Theunis de Jong's picture

What, you mean you'd pay $20 a month just to use IF?

Since the enhanced "CC" versions are not out yet, you'd get InDesign CS6. The script works *perfectly* with that version.

In addition, Adobe promised -- for whatever their word is worth something -- you'd always have access to CS6 versions, even when 'upgraded' (*) versions come out. Or that's what I remember from various confusing statements handed out in their forums.

If you want an overview of what the full version of IF is capable of (design with filled black and white vector objects! automatic OT code!), feel free to peruse the manual (direct link to the PDF).

(*) (Can Not Resist: for InDesign CC this comes down to (a) a Dark UI, (b) QR codes, (c) ... uh ... that's it.)

Queneau's picture

I bought the full version, and from what I have tried thus far, it works great. Thanks so much!!

I am an Illustrator and Graphic designer with a big interest in typography. I have done some testing with font editors, but for my usage these are mostly too expensive. IndyFont seems perfect though. I love the fact that additional OT features can be added this easily. Great work, I hope you keep expanding upon it and of course that it is a success for you.

some questions:

I am curious to know if kerning might be a possibility in an updated version? As I would be creating mostly display fonts, primarily for my own use, I think optical kerning can be used, or I might use the kerning script by Peter Kehrel... What if I might want to use a font editor in the future to enhance these fonts (or ask someone else to do so)? Is it possible to create formats like UFO which can be further enhanced in font editors?

Another question would be if other opentype functions like discretionary ligatures or stylistic sets are, or will be possible to create with IF?

Theunis de Jong's picture

Jeffrey, thanks! I think you fit *exactly* in our envisioned target audience :-)

I have thought about kerning, but I cannot work out a good interface to add this to a font ... Currently, IF's Design Paradigm is "one page, one glyph" -- this sort of follows naturally from working through InDesign's interface. (But suggestions are welcome. I agree it would be a nice addition.)

The UFO format is only used by professional type designers. Theoretically I could add an export function specifically for this ... but that is veering outside the main purpose of the program. On the plus side, though, since the exported font is a regular OTF font, you should not have any problems opening and editing it with any existing font editor. (Of course, you'll have to keep in mind that any external edits will be lost if you re-create the font through InDesign.)

There are lots of OTF features that may be added. For this first version, we (I and Marc Autret, the programmer who re-wrote my demo into a full product) chose to add a couple of obvious eye-candy features first and see how that works out. There is a long list of other, more rarely used features that could be integrated with more-or-less the same code, and they may appear one at a time in various updates.

Queneau's picture

Great, thanks for your reply! I’m looking forward to putting IndyFont to the test!

abuzaynab's picture

Hi there

Is it possible to use indyfont to create individual letters with diacritical marks from an already existing font? I am trying to transliterate Arabic letters and the fonts with the appropriate characters aren't very dynamic.

So, for example could i take the capital H from Garamond Premier Pro, put it into indyfont and then add the diacritical mark of a dot directly underneath it like this character “Ḥ” and then export that as a glyph to be used within my text when needed?

Thank you!

Theunis de Jong's picture

abuzaynab, that is indeed possible. You can select any available font on your system as 'template' and so all you have to do is move an underdot in the appropriate position under an "H", assign the correct Unicode (highly advisable), export, and you have a new font.

But .. see David W. Goodrich's advice on InDesignSecrets; with IndyFont you cannot change existing fonts, so you need to add your characters as a new one. That may mess up ID's native kerning. Another limitation is that you must select this new font for all individual characters (GREP Styles may work, but this depends enormously on your current style set-up).

Try the free One-Character demo for your "H-dot" and see if it works for you.

Syndicate content Syndicate content