GSUB: replace by nothing, a.k.a. deleting a glyph.

Is there some way to do the following? 

lookup ccmp {

    sub A B' C by [];

} ccmp;
Where the orginal glyph for B is simply removed. Or in other words, replaced by nothing.

I tried leaving out the "by" part, replacing with [] or "", and scoured the afdko documentation but nothing will compile.

Or is this simply not possible?

Comments

  • Perhaps
    sub A' B' C by A;
    will work.
  • Roel NieskensRoel Nieskens Posts: 129
    edited September 17
    Thanks, Jens. But how would you solve the following?

    sub A by []; # This doesn't compile


    Edit, I'm seeing this being done in some ttx, like here: https://github.com/googlefonts/noto-emoji/blob/833a43d03246a9325e748a2d783006454d76ff66/NotoColorEmoji.tmpl.ttx.tmpl#L330

  • Jens KutilekJens Kutilek Posts: 231
    edited September 17
    I think it may not be possible in high-level editors. Neither the FDK syntax nor VOLT seem to support substitution by "no glyph". I tried to export a .fea file from NotoColorEmoji via OTMaster, and it throws an error due to empty target sequence.

    Do you actually need to remove the glyph, or could you replace it by a zero-width glyph with no outline instead?
  • By the looks of the commit message it was to work around a specific issue, in combination with custom tooling. That's that mystery solved, I suppose.

    Your first solution helps me out in my case. Thanks again, Jens!
  • Erwin DenissenErwin Denissen Posts: 170
    edited September 17
    Even though the OpenType specification prohibits it, FontCreator allows you to define entries in a multiple substitution lookup with no output glyphs. This is a trick to delete glyphs, and seems to be supported by Windows and web browsers.
    lookup MultipleSubstitution1 {
      sub A -> "<delete>";
    }


Sign In or Register to comment.