origins of InDesign's new paragraph layout engine?

qu1j0t3's picture

Keynoting the 3rd International Conference on Typography & Visual Communication in Thessaloniki today, Dr Peter Karow - wunderkind founder of URW, father of IKARUS and behind much seminal digital type R&D - asserted that InDesign incorporated the "hz-Program" which is familiar to typophiles as his collaboration with Hermann Zapf to add "artificial intelligence" to H&J.

As a TeX user and porter since the 1980s, and someone who always lamented the relative braindeadness of all Mac WYSIWYG engines until this innovation finally appeared in InDesign, I particularly noted Adobe's bragging in sales literature that they had finally noticed and incorporated TeX's engine - the source code of which has been freely available since around 1983. (It's understood that Adobe's formatter goes a little beyond TeX's, at least in convenience.)

The TeX history page says that TeX's method is "the basis" of the hz-Program, but this is the first mention I've seen that the two pieces of software are connected in any way. Dr Karow did not mention TeX in his talk [Professor Knuth copped one mention re: METAFONT, but oddly, Dr Karow mentioned that weight interpolation from a single master remains unsolved, although MF surely is one solution]. I felt too awestruck by the great man - and confused by not being able to relate his assertion to Adobe's literature - to ask him myself; but can any typophile confirm what the connection actually is? Is Adobe too coy *cough*NIH*cough* to admit that their fancy new algorithm is actually Made In Germany?

Btw, Hrant: You are sorely missed in Thessaloniki. They tell me you haven't registered (yet?) I hope no misfortune is keeping you from our company.

litera's picture

Yes. I've been reading Bringhurst's "bible" just when I first came across InDesign 1.0's multi-line composer. Bringhurst talks about the HZ Program in 9.3. (Scribal Justification; page 189..191). I immediately connected the two together. Because URW developed the algorithm in 1993 with Zapf. The reference was Gutenberg's 42-line bible.

The method is also called (as Bringhurst says) Semitic justification

When I first used InDesign 1.0 I knew I'll never switch to anything else even though it lacked many features others had for years. And got them with newer versions. And more.

To call it like that: I LOVE InDesign mainly because of HZ (or its derivative) implementation.

hrant's picture

Toby, thanks for your thoughts. Know that I'm missing the conference much more sorely than anybody there could possibly be missing me. It has become my favorite type conference ever. There are a few reasons I couldn't make it, some of them unfortunate (but not tragic or anything) but one of them is actually a good reason: we're taking a family vacation to Crete in July, and going to Greece twice in a month would be too much of a good thing! Anyway, I recently wrote to Klimis expressing my regrets, and promising to make a better effort to show up next time.

Concerning the HZ/TeX connection, all I can tell you myself is that there does seem to be some connection: during a TeX-centric project I worked on with a university in Britain, I was told that they had acquired development rights to the HZ algorithm as a result... This is pretty tenuous, I know - sorry.

> Semitic justification

What a strange, strange term. Tsk tsk, poets.

hhp

Si_Daniels's picture

If you're too shy to talk to Peter maybe you could quiz David Lemon. I enjoyed the talk but was a little sad not to have his take on new stuff like Superterpolation (sp?) or ClearType.

>What a strange, strange term. Tsk tsk, poets.

You can ask him about it at TypeCon. ;-)

Cheers, Si

Si_Daniels's picture

Story is that Adobe acquired a bunch of patents when URW went out of business. They also had Dr K work with them for a year in 1994. So what they have in Indy is HZ. The sales blurb would have talked about TeX because potential customers (such as TeX users) would not know what HZ was.

As to the TeX and HZ connection, a lot of ideas flowing between Peter and Donald so maybe there's an element of each camp's supporters taking credit.

qu1j0t3's picture

Sii, Nice to meet you at the conference. You and I caught David Lemon's extempore answer; thankyou for summarising.

To be more specific on the TeX question, I think we can regard seriously the implication on the TUG "What is TeX" page that TeX's method (essentially complete and public by 1983, distributed on tape, in papers, and in book form as a literate program) is the basis for hz's "optimal" paragraph composer, so Adobe's marketing literature crediting TeX isn't exactly wrong. Knuth's flawless implementation would have made an ideal (and legally possible, being early "open source") foundation. (The hz-Program page on Wikipedia hints at a connection but does not claim direct descent from TeX.)

The missing concept from TeX's implementation is the continuous modification of typeface parameters to optimise setting (whether geometrically - horizontal scaling, tracking) or through parametric fonts (Multiple Master, etc). I am not sure how much of this InDesign actually does today, though it seems that it was part of the hz-Program concept.

As David reminds us, the association of Dr Karow, Professor Knuth, and Hermann Zapf is so close that it's rather difficult to say exactly who conceived what; we can assume that much wine and beer was consumed in smoke filled rooms while the concept evolved. :-)

My curiosity was piqued because I'd never seen the programs publicly associated before. I do see that there is a sentence about the Adobe/hz link on Zapf's Wikipedia page.

Hrant: All I can do is hope that we can both be at the next one. Also, will you help me persuade Grant H. to sample the pleasures of Thessaloniki with us. My efforts this year were in vain, but perhaps he knew you weren't coming. :-)

charles ellertson's picture

The missing concept from TeX's implementation is the continuous modification of typeface parameters to optimise setting (whether geometrically - horizontal scaling, tracking)

Actually, my business partner wrote a letterspacing feature for our implementation of TeX. Worked fine. But in general, to each their own. I'd say that the Adobe paragraph composer lacks the refinement of TeX, where you could program penalties and/or demerits for a large number of things. As far as setting text goes, and based on limited exposure, InDesign doesn't approach TeX. As far as a "layout engine" for modern graphic design goes -- where with each passing day 'text' seems to move farther down on the list of importance -- InDesign seems far better.

I wonder if Adobe's not mentioning TeX isn't a corporate thing. These days corporate attorneys seem at the center of everything, and patent law makes sense to us laymen only when you consider how lawyers make money.

qu1j0t3's picture

Charles, yes, there are certainly ways to get tracking in TeX using macros, and this can work together with the smart composer, but with limitations. Firstly, pairwise kerning is defeated if you add explicit space ("glue") between characters, either manually or with a macro; horizontal scaling is not possible in standard TeX; and the traditional TeX paragraph composer can't access these features (or the more advanced idea of altering a parametric font) for its own purposes, e.g. line by line.

[In other words, if you wanted to allow, for example, a small amount of negative tracking to assist in H&J - as an XPress paragraph style can do - then you would need to give up pairwise kerning, and you'd have to ensure that entire paragraphs received the glue consistently throughout - unless you are doing manual line by line tweaking. The algorithm can make counter-intuitive changes to breaks in order to improve global optimality, so such fine tuning is neither as necessary nor as simple as it is with a dumb algorithm. As we know, XPress needs a lot of manual help to get anywhere close to ID's composer.]

But these are minor details in a 25 year old program, which, as you say, remains essentially unparalleled in terms of setting quality. (Users of Berthold digital systems may have grounds to quibble.)

Re: mentioning TeX - you must have misread what I wrote: Early Adobe literature credited TeX directly for its advanced composer, but did not mention hz, and it is now clear that mentioning both would set up a contradiction which remains unresolved.

My initial question is, however, answered: URW's IP, and the personal attention of Dr Karow, were direct inputs to Adobe InDesign.

charles ellertson's picture

I suppose this is an aside, but Firstly, pairwise kerning is defeated if you add explicit space ("glue") between characters, either manually or with a macro; isn't quite right.

I don't know how he wrote it, but Larry Tseng's macro did not disrupt pairs kerning -- though I believe there was an interaction with the spacing and the kern values. I do remember that if you put in an explicit \kern (in the text stream) within this command, you'd better take a look, because it might not measure what you thought it would. This letterspace command could be either positive or negative. It worked fine for, say, small caps, or for tightening up words on the title page, but we didn't use it for general text setting; you would have had to put it in each paragraph explicitly.

Days gone by, when I was a compositor . . .

John Hudson's picture

Hrant, I don't think 'semitic justification' is a strange term, but note that it applies specifically to one aspect of the hz algorithm, i.e. the intelligent stretching or condensing of letter widths. This aspect of the algorithm is not implemented in InDesign. Since this method of justification is precisely that used in the Arabic, Hebrew, Syriac and quite probably other semitic scripts, the name makes a lot of sense.

hrant's picture

OK, I get it now, but I still think there's a difference: the letters are not really "stretched" the way we think of the term, and the way the HZ algorithm does it; it's more that the horizontal joins are stretched (closer to Arabic) or that the horizontal parts of letters are stretched (closer to Hebrew). This might seem like nitpicking, except when you look at the large quality difference in the actual results between Semitic scripts using the feature versus Latin, which doesn't really "stretch" at all well. Furthermore, the large structural difference between Arabic and Hebrew (in terms of joining or not) makes the label wobbly. I suspect he was just itching to call something "Semitic". :-)

BTW, what software was used to set "Language - Culture - Type"?
I ask because there's a lot of heavy stretching in it.

hhp

qu1j0t3's picture

Charles, I believe that to say, "automatic pairwise kerning is defeated," is fully correct. In this circumstance it is very difficult for a macro to restore pairwise kerns, but theoretically possible, I suppose. Of course, I'm talking about standard TeX - perhaps Larry made a supporting source code mod?

I had a chance to talk over some of the differences between TeX and hz with Dr Karow this evening, but I am still unsure of many facts. I hope he won't mind if I pass on some fruits of that talk here, as I recall it.

It seems that Adobe's implementation has diverged (less and/or more) from the original hz concept, but reasonably enough, he is not able to shed light on details. He did confirm that Professor Knuth's original code ("that he could write over a weekend") was the starting point, but was further "polished over months" by [URW's] software engineers.

Dr Karow reminded me that URW had a firm grip on any relevant technology for interpolation (e.g. condensed/expanded), decades before Adobe's Multiple Master, and I suspect hz would have leveraged this.

We might glean some of the original concept from what was written about hz before the IP passed to Adobe. As I speculate, it may have worked on two levels, firstly the parameters we are familiar with (condense/expand within about 2%, to be unnoticed) and secondly the stretch/join mechanism - for which opportunities seem rather sparse in Roman text (Hrant, any references for that capability in hz? For that matter, any references in the 42-line bible?) Dr Karow mentioned that more extensive use of ligatures (à la Gutenberg) was tested but was not received well by his typographic judges. I got the impression that simple tracking or scaling was considered too unsophisticated.

John Hudson's picture

BTW, what software was used to set "Language - Culture - Type"?
I ask because there's a lot of heavy stretching in it.

:(

Yes, and I still don't know why. The book was set in the first version of InDesign, and some stretch got applied to random passages. Obviously I didn't do it manually, and I can't imagine what sequence of accidental keystrokes or cursor clicks might have produced similar errors in different parts of the book.

Regarding 'semitic justification': the idea of the hz smart stretching (the Ek-program) is that it would not increase the weight of vertical stems, but would only increase the distance between them, stretching the horizontal strokes. This is explained and demonstrated in the original URW brochure: 'Only the white counters are actually expanded or condesnsed, not affecting stroke widths at all...'. The results in the brochure are impressive (as are the results of the Kq-program for optical scaling from a single master), and the amount of expansion or contraction required for justification would be very small. Obviously some type designs might be expected to fare better than others (the fact that examples of different hz programs are illustrated in the brochure with different typefaces makes me wonder to what degree types were selected for showing the software to advantage).

The main difference between the hz approach and that used in justification of semitic scripts is that the latter are rule-based on the level of the word or the line, while the hz scaling is rule-based at the level of the individual letters.

Thomas Phinney's picture

Summary: InDesign's paragraph composer uses aspects of the hz engine, which Adobe acquired the patent for. To the extent hz is descended from or related to the TeX justification engine, InDesign's approach is at least somewhat descended from or related to that as well.

Cheers,

T

Si_Daniels's picture

Tom has the final word. :-)

Syndicate content Syndicate content