Special space for lowercase?

Is there a way to create and sub a special word space for use with a Lowercase class?

I tried duplicating the space character and renaming it to space.alt so a simple class substitution could be done but makeOTF doesn’t like the alternate space.

I realize that all apps would have to be able to work with any duplicated space character for alignment and justification so my request may not be possible.

An alternative would be if kerning would support kerning the space character against a Lowercase class, i.e. @Lowerwordspace kerned to @space, that would work but I’m not sure if that can be done either because @Lowerwordspace is defined outside the kern table and @space would be inside.

I go the other way and positive kern the caps to each-other in classes.

@Dezcom – Either way, since I’m wanting only to decrease the word space for lowercase, it will involve a kern of some sort.

This somehow seems very inefficient to me because I think setting up the classes in the Features panel would work much better – if it can be done.

I need to do some more testing.

UPDATE:

I did get it to work. What I had missed before was establishing a @Spaces class in the Features panel. I had only the @Lowerwordspace class. Fuzzy thinking at work … sorry.

Once I added the @Spaces class and made a calt sub entry to handle it, I achieved the goal of a smaller word space on the lowercase only – which includes comma, period, hyphen, superiors, et al.

However, it doesn’t work on the Cyrillic lowercase. That will likely be a naming issue so I need to find a way to fix that.

So far, only tested in InDesign CS6.

@Georg or Rainer – which name in a class would InDesign and others apps most universally recognize for Cyrillic: GID, unicode number or the spelled out unicode name?

1 Like

I think the most logical place for wider space character would be cpsp feature, although not many application support it nor people know it exists.

For Cyrillic the final name will be uniXXXX by default, although you shouldn’t have to care about it while writing a feature within Glyphs. I guess your class or context is incomplete, or you might have to fiddle around with script or language tag + local feature to make it work?

First, I’m not looking for wider character spacing. Second, cpsp is for Caps Spacing only. That’s the specs the way I read them.

If anyone happens to know what field positions 2 & 4, i.e. “cpsp <0 0 0 0>” values are for, please share it. The specs don’t say and I have been unable to find the information.

It's just the other way around of what you are trying to do (though not quite the same, I know). And actually you can write anything in any feature. The specs only tells you what the user should expect to happen. You can even write ligature substitution in cpsp, and it works just fine.

Each of the cpsp (or just any GPOS in general) refers to horizontal shift, vertical shift, horizontal width, vertical width, and they are all relative, not absolute. For example, if I write the following, the A will be raised by 100 units.

pos A <0 100 0 0>;
(pos A <0 0 0 -100>; gives you the same result, but also affects vertical width)

If I do this, the A will have 20 more units space on both sides.

pos A <20 0 40 0>;

This can be written wherever. Instead of making hyphen.case, theoretically you can simply adjust the height and metrics this way in case feature (it works just fine in InDesign), but I think it’s more convenient to make an alternate exist.

These are the y values. Documented as ‘value record format B’: http://www.adobe.com/devnet/opentype/afdko/topic_feature_file_syntax.html#2.e.iv

Tosche & Rainer: thanks for that info.

Now, about that name…? I think I will first try changing the Cyrillic class name to the unixxxx name and see what happens. That seems the best place to start.

No need to change to uniXXXX names. I added space.alt and let it appear before @lowercase class that contains all Latin, Greek, and Cyrillic, and it worked. There is probably something wrong with your feature.

Though it may be too simple to explain, my code is below:
@lowercase = [a b c … etc. ];
and in the calt feature,
sub space’ @lowercase by space.alt;

My code is similar. Either way should work, and it does work except with Cyrillic lowercase even though all the Cyrillic lowercase is included in @Lwordspace.

The calt entry reads: sub @Lwordspace [space nbspace]’ by @Spaces;

@Spaces contains space.001 and nbspace.001. calt is referenced in aalt, put there automatically by Glyphs. It doesn’t have the reload symbol as the others do, although I don’t know why.

Differently from yours, my @Lwordspace and @Space were defined in the class section of Features where @Uppercase is defined.

I have been quite busy today so haven’t had time to return to testing; perhaps later.

Hm, I can’t help you further unless I see the file. Is it possible for you to send it to me, or maybe mekkablue or Georg?

Be aware that not every text renderer actually uses the space glyph in your font. So, substitution features involving /space may be ineffective under certain circumstances.

Rainer, that definitely was a concern. Since I still am unable to get it to work with Cyrillic I think the best thing to do is kerns for all the LC – a lot of extra work but worth it.

I figured out, finally, why I couldn’t get my spacing rule to work with Cyrillic lowercase. I had copied and pasted the Cyrillic text from a reference file into InDesign and forgot to apply Contextual Alternates.

After all that though, I abandoned the lowercase rules because after thinking more about the issue I decided it will cause less problems for the user if I establish spacing rules for the All Caps feature only.