Tool to create GSUB table based on identical characters?

Roel Nieskens
Roel Nieskens Posts: 188
edited February 2016 in Type Design Software
I have a font where both uppercase and lowercase have the same design. E.g. the CFF entries for "A" and "a" are exactly the same. Is there a way to avoid this duplication? I'm thinking of a tool that can create a GSUB table based on characters it finds are identical. 

Comments

  • Ray Larabie
    Ray Larabie Posts: 1,432
    I've had to do this in a situation where I had a client who wanted needed extremely detailed textured fonts. So detailed that the font was teetering of the edge of crashing. I created blank glyphs for the lowercase and two classes:

    @upper: ABCDEFG...
    @lower: abcdefg...


    feature whatever {
    sub @lower by @upper;
    } whatever;

    I'm not sure what feature I'd use if I were to do it again. My client wanted it in liga so that's what I used.
  • That looks simple enough, thanks. I'm used to working in TTX. What tool/language is your example in?
  • Roel Nieskens
    Roel Nieskens Posts: 188
    edited February 2016
    It seems I was overcomplicating — I blame a lack of coffee! It seems the much saner and simpler solution is to use the CMAP table for its intended purpose:
    <map code="0x41" name="A"/><!-- LATIN CAPITAL LETTER A —>
    <map code="0x61" name="a"/><!-- LATIN SMALL LETTER A —>
    Should be changed to
    <map code="0x41" name="A"/><!-- LATIN CAPITAL LETTER A —>
    <map code="0x61" name="A"/><!-- LATIN SMALL LETTER A —>

    Automating this is a lunch-break worth of scripting :)

  • Agree that CMAP is the way to go; Ray's example is in Adobe Feature File Syntax