SILE Plugin: Opinions from designers please

I’ve started work on a plugin which integrates the SILE typesetting engine into Glyphs. Basically this means that, as you design, you can have your font previewed as it would appear in a typeset document, with paragraphing, hyphenation, spacing and so on:

At the moment it just works with one master and one font size. When it’s completely done you will be able to change instances, sizes, use other fonts from your system in the document, and so on. SILE fully supports bidirectionality and any global scripts in Unicode, so that’s all not a problem.

The question I have is, if you could have something like this, how would you like to use it? At the moment the way it works is that you type in your text to be typeset, hit a button and a couple of seconds later it appears on the screen. If it would be more useful to have the document re-typeset itself in real time as you pushed your points around, then I will have to do some work to make it a lot faster. (I don’t think that’s impossible.)

What other features would make this useful to designers?

3 Likes

This looks promising.

Will it do a live refreshment ?

Is that something that would be useful? It’s possible but I would have to do a lot of optimizing, particularly the output routine, to make it fast enough to be usable. If it refreshes every time you move a point it will have to be near instant, otherwise it will degrade your editing experience.

And here’s another screenshot showing the use of SILE commands during preview:

I think it is key. Otherwise I could just use InDesign for example and export my fonts.

Well the question is, how “live” is live? If pushing a button and then getting a redraw after 2 seconds is fine - and that’s much easier than a re-export to InDesign - I’ll leave it as it is. If you want really live, then it will take a bit more work.

Well done Simon! This may be very useful, but test a font on the same software that end users use (eg InDesign) is really better. In addition, testing on InDesign or Illustrator is very fast and very simple. What SILE Preview offers more?

I think it is most useful to test featur code. Halfbuzz has very good support for complex scripts and that produces result close enough to what Firefox and office would show. Indesign has some limitations for complex scripts.

1 Like

This looks great, well done Simon! I agree with Georg, the beauty of it is that it runs on Harfbuzz and that makes it very handy for testing scripts that are iffy or not supported in InDesign.

I’d like to be able to drop text into this window (either by copy-pasting or by drag and dropping a .txt file). I think Harfbuzz should then put the characters in visual order, position marks, make substitutions and kern, right? I think there could be buttons/dropdowns for script and language settings that can be read from the font.

It would be handy to store a user-defined list of strings, in the same way that the Glyphs has an editable list of ‘sample strings’.

I’m a huge fan of custom colours, and changing foreground/background would be good.

Agree with Georg. Essentially what I want is a HarfBuzz OpenType tester, so I don’t necessarily need a full typesetting environment as long as I can modify some basic attributes (e.g. font, size, colour, features), preferably from a GUI. And vertical text, which is where Glyphs is least capable of in terms of OT testing (or any font editor for that matter).

That would already be a great move forward to not need InDesign anymore. Refreshing is faster, battery impact much less. And if you can trigger it with a single shortcut, that would also be faster than the current InD workflow (Cmd-E, Return key, Cmd-Tab, wait a second).

Updating on every point move will probably be too much, because you need to generate a new font every time, and that can turn out to be slower in the end.

Forgot to say: print to pdf would be very handy too.

I would be very content with that !

OK, thanks for the feedback so far. That helps me to know how to proceed.

Basically there are two ways I could go in implementing this plugin. The obvious way is to generate and export a full font every time you hit the typeset button, and just hand that to SILE’s built-in Harfbuzz shaping.

I actually didn’t do that. The way it’s implemented at the moment is probably a bit too clever. It uses Glyphs’ “temporary font” to get ligature/glyph substitution/glyph ID mapping from Harfbuzz, and then it doesn’t actually generate a full font. Instead, it uses the actual curves from the Glyphs layer for the metrics and for drawing the glyphs on the preview window.

Which way is best depends on what you want to get out of this. The first way gets you much more comprehensive previewing of positioning, OpenType features and so on, so is more useful in the later stages of producing a font; the downside is that it’s a slower and more cumbersome process (relatively speaking). The second way is better if you’re more interested in seeing how your designs look in the context of paragraphs on the page while you’re still sorting out your letterforms and spacing; the downside is that the positioning stuff would need to happen “by hand”, and also that because it’s not generating and exporting fonts but using the design data from Glyphs, you aren’t able to preview instances, only masters.

It sounds like what most people want is the first thing, a Harfbuzz-driven features preview, rather than a contextual full-paragraph design preview. So I will work on getting that implemented.

Although, of course, we can do both methods and allow you to switch between the two. :smile:

I think being able to see a paragraph view without having to zoom in and out would be really great (see also this thread )

[quote=“SimonC, post:13, topic:3161”]
the downside is that it’s a slower and more cumbersome process (relatively speaking).[/quote]
How slow, is that 2 seconds? That would be definitely acceptable and still faster than InD process.

I would definitely appreciate being able to preview features too.

2 seconds is for the current pull-curves-out-of-Glyphs implementation. I don’t know how much slower it would be to export your instances and then typeset, because I haven’t implemented that yet but it I expect it would be quite a bit slower.

That should be faster. I profile this as soon as I have the plugin up and running on my machine.

You can

that is not true. You can generate a instance on the fly (as I do in the preview panel with the instance preview active). This is of cause a tiny bit slower then to just use the masters.

OK. I’m going to use generated fonts because that gives us complete feature support. How do I (quickly) generate a full OTF for an instance on the fly?

Is GSInstance.generate() what you need?
http://docu.glyphsapp.com/#generate

Could be. But by default that writes to the last exported directory; there’s also something somewhere that writes OTFs into ~/Library/Application Support/Glyphs/Temp. GS also mentioned something about the ability to export only the subset of characters that you need.

Sounds promising. How does it handle on the issue of comparing screen rendering vs. actual print. I would imagine that there could be a lot of variety in outcomes.