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

Is there some way to do the following? 

<div>lookup&nbsp;ccmp&nbsp;{

</div><div>&nbsp;&nbsp;&nbsp;&nbsp;sub&nbsp;A B' C&nbsp;by&nbsp;[];

</div><div>}&nbsp;ccmp;</div><div><br></div>
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: 187
    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: https://github.com/googlefonts/noto-emoji/blob/833a43d03246a9325e748a2d783006454d76ff66/NotoColorEmoji.tmpl.ttx.tmpl#L330

  • Jens KutilekJens Kutilek Posts: 338
    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: 291
    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 {<br>&nbsp; sub A -> "<delete>";<br>}


Sign In or Register to comment.