Substitute cap only at beginning of word.

octopi's picture

I have converted and coded a hand drawn, hand writing display font for the head artist at the company I work for. It is an OT PS font. Happily, the artist and company are very pleased with it. I put in some OT features so that double letters in words such as Happy, Mummy, Daddy etc will have an alternative glyph automatically inserted on the second letter. This gives it a much better hand writing feel.

I am now stuck on the upper case 'A'. The single glyph, as drawn by the artist, has a very long crossbar. This looks fine when alone in a caption such as: A Merry Christmas, but looks bad on the front of Anniversary. So I made an alternative with a shorter crossbar.

I cannot figure out the code that will automatically change the 'A' to the shortened crossbar glyph when it appears at the beginning of any word, leaving it as the elongated crossbar version when it stands alone. So to clarify, the elongated 'A' is the standard, the shortened crossbar being the alternative.

Any help or pointers would be greatly appreciated.

Mark Simonson's picture

Something like this:

sub A' @anyletter by A.alt ;

where @anyletter is a class that contains all the letter glyphs in your font (or any other glyphs that matter if they follow your default "A"). And "A.alt" is the version with the short crossbar. Use whatever name you've given it instead of "A.alt" if that's not what it's called.

Syndicate content Syndicate content