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?


  • Perhaps
    sub A' B' C by A;
    will work.
  • Roel NieskensRoel Nieskens Posts: 137
    edited September 2019
    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:

  • Jens KutilekJens Kutilek Posts: 247
    edited September 2019
    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: 204
    edited September 2019
    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 {

Sign In or Register to comment.