Cursive Attachment - Need a detailed Tutorial

moiz217's picture

Hello all,

I'm working on an Arabic Naskh Font. I want to add cursive attachment to the glyphs.

Here are some confusions I have regarding Cursive attachment:

1. Do I need to define cursive attachment to all INIT, MEDI and FINA glyphs to all the other INIT, MEDI and FINA glyphs. (I think that is a lot of tedious work).

2. What will happen to the marks attached to the glyphs e.g. will they move up with glyphs or stay in there place, potentially colliding with the base glyphs.

Please suggest links to any step-by-step detailed tutorials. I have seen all the material provided by VOLT site, but can't find the answer.

I would humbly request Mr. John Hudson to write a detailed tutorial on cursive attahment in the context of Arabic fonts.

Thanks.

John Hudson's picture

[Moderators : this discussion probably belongs in the Build forum.]

First the easy part: in answer to your question 2, the mark positioning lookups should be ordered after the cursive attachment lookups (mark-to-base/ligature and then mark-to-mark positioning should always be the last GPOS operations). The mark positioning will be relative to the cursive attachment positions.

Here is an image of a VOLT cursive attachment lookup for Arabic attachments:

I've chosen the yeh_meem ligature for illustration purposes, since it has the most dramatic height adjustment in this font (MS Arabic Typesetting). Let's look at the image carefully, as the way VOLT handles cursive attachment positioning isn't very intuitive.

The first thing to note is that we're only defining ‘exit’ attachment points, and the adjustments are all being applied to the second glyph (the left glyph in this case, since we're dealing with a RTL lookup direction). The values are positive, but visually the glyph in the GPOS window is moving left and down. If you have designed and spaced your glyphs appropriately, the dx ajustment can always be equivalent to the advance width of the glyph, which is helpful and saves time.

You don't need to define cursive attachment for all the initial, medial and final combinations in your font: only those that require something other than default positioning. However, note that any glyphs that do occur in the cursive attachment lookup must be provided with attachment positions to every other glyph in the lookup to which it might be expected to connect in text. Beware of stray default values within the lookup, as these will produce collisions and overlaps.

As you can see from this lookup image, it is possible to use glyph groups as you would for mark positioning.

This is somewhat less than a ‘detailed tutorial’, but hopefully it is helpful. Once one knows how to set up the VOLT lookup, the rest can be learned from trial and error.

moiz217's picture

Hello,

Thanks John Hudson for taking the time to reply. Your answer has boosted my moral, and I'm looking forward to dive into cursive attachment. I would request you to post a couple of other screen shots from the lookup you have shown, so that everyone gets a good feel of it.

Please explain the below statements in more detail.

You don’t need to define cursive attachment for all the initial, medial and final combinations in your font: only those that require something other than default positioning. However, note that any glyphs that do occur in the cursive attachment lookup must be provided with attachment positions to every other glyph in the lookup to which it might be expected to connect in text.

I would like everyone who has got his hands dirty with cursive attachment to participate here.

With regards.
Thanks.

John Hudson's picture

If a glyph occurs in either the first or second glyph column in the cursive attachment feature, then you must define an appropriate exit attachment point for this glyph relative to all glyphs in the other column. You can't leave the dx and dy values for that exit attachment point at 0,0 because this will be interpreted as an exit attachment point with those values, not as default positioning. So to avoid more work than you need to do, only put glyphs in the cursive attachment lookups if they need to be there, i.e. if they need to connect to another glyph in something other than default positioning.

I'm going to bed now, but I will revisit this discussion tomorrow. I will also bring this to the attention of Sergey Malkin, the VOLT programmer, who may have other advice.

Stephen Coles's picture

[ Thread moved to Build Forum ]

John Hudson's picture

Here are some more images, showing the stages of defining a cursive attachment lookup in an Arabic font. In illustration 1, we have created the lookup and defined it as a cursive attachment lookup from the drop down list of GPOS lookup types. This automatically creates the two column layout for 1st and 2nd glyph and the 'exit' attachment point. We have also set the lookup display direction to RTL. At this stage, all the values are still at 0, and you see that the two glyphs are overlapping, this is because the values are saying that the exit attachment point at 0,0 is the same as the entry point.


_

It is helpful to remember that entry and exit are not directional concepts within the GPOS lookup. When designing Arabic glyphs, we may be thinking about them in terms of right-to-left connections, but just as all positive directions in glyph space are reckoned from left-to-right (and bottom-to-top), so entry and exit are reckoned in terms of left side and right side. So even though, from an Arabic script perspective the connecting stroke enters from the right and exits to the left, in VOLT we are actually defining an 'exit' attachment that is on the right side of the 2nd glyph. [I think I've got that right: it confuses me too sometimes!]

Now here's illustration 2, in which we have defined the dx position of the exit attachment point. In this font, this is equivalent to the advanced width of the 2nd glyph (344 units), which is convenient. In other words, the glyph has been spaced so that the horizontal position of attachment point is directly on the right sidebearing. You see that when this is applied the 2nd glyph shifts to the left. In effect, you are saying that the horizontal position of the exit on the right side of this glyph is aligned to the left sidebearing of the first glyph, whose own dx value remains 0. [If you had not designed and spaced the glyphs so that they fitted together neatly when the sidebearings align, you would need to make many more adjustments to dx values for both 1st and 2nd glyphs, which gets very messy. In order to make cursive attachment positioning easy, it is important that the initial spacing be appropriate and consistent; this is also true, of course, for mark positioning and other kinds of GPOS.]


_

Finally, here is illustration 3, in which the dy coordinate has also been specified. This says that the attachment position is 508 units up on the right side of the 2nd glyph. So of course this means that the glyph shifts down relative to the first glyph.

-

Although we are always looking at two glyphs together, and can scroll through the 1st glyph column to see the 2nd glyph in context of all 1st glyphs in the lookup, it is important to remember that there is only one exit attachment point on this second glyph. If you change the values when looking at one pair of glyphs, it will affect all the other pairs of glyphs involving the same 2nd glyph. In other words, cursive attachment positioning is similar to mark anchor attachment positioning, not similar to kerning pair adjustments.

moiz217's picture

Thank you very much for replying again.

The screen shots are great and they helped a lot in understanding the concept of cursive attachment. Your explanation was, as usual, clear and concise. Thanks again for your valuable guidance.

One thing that I inferred from this discussion is that I might need to break my cursive lookups into various categories to ease the development and reduce redundant combinations.

I have started adding cursive lookups to my font. I'll post the screen shots of the font as soon as I'm done with it.

With regards,
Thank you.

.الخط هندسة روحانية، ظهرت بآلة جسمانية

John Hudson's picture

One thing that I inferred from this discussion is that I might need to break my cursive lookups into various categories to ease the development and reduce redundant combinations.

If you are doing this, remember that cursive attachments are like mark anchor attachments: once you set them in one lookup, the values are inherited by any other lookup containing the same glyph in the same column. If you change the exit coordinates for a glyph in one lookup, it will also affect the same glyph in other lookups.

Syndicate content Syndicate content