# Deactivate OpenType feature when user modifies spacing

**URL:** <https://forum.glyphsapp.com/t/deactivate-opentype-feature-when-user-modifies-spacing/32424>\
**Category:** Using Fonts\
**Created:** [January 2, 2025, 10:00am UTC](https://forum.glyphsapp.com/t/deactivate-opentype-feature-when-user-modifies-spacing/32424 "2025-01-02T10:00:27Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![SiriLeeLindskrog](https://forum.glyphsapp.com/letter_avatar_proxy/v4/letter/s/9fc29f/32.png) [@SiriLeeLindskrog](https://forum.glyphsapp.com/u/SiriLeeLindskrog)\
**Post date:** [January 2, 2025, 10:00am UTC](https://forum.glyphsapp.com/t/deactivate-opentype-feature-when-user-modifies-spacing/32424/1 "2025-01-02T10:00:27Z")

</div>

Hello.

I am working on a font that has an opentype feature which only works as intended when the user is not modifying the spacing or kerning in Indesign or other applications. The feature looks broken if the user modifies the spacing so i was wondering if there is a way to make the opentype feature automatically de-activate as soon as the user modifies the spacing or kerning?

The opentype feature is Calt.  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![FlorianPircher](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/florianpircher/32/30457_2.png) [@FlorianPircher](https://forum.glyphsapp.com/u/FlorianPircher)\
**Post date:** [January 2, 2025, 10:08am UTC](https://forum.glyphsapp.com/t/deactivate-opentype-feature-when-user-modifies-spacing/32424/2 "2025-01-02T10:08:24Z")

</div>

Sadly, the font has no control over this.

Applications will frequently disable ligatures when the spacing/kerning is adjusted, so if it makes sense, you can put your `calt` code into `liga` and hope for the best.

---

<div class="post-metadata">

**Author:** ![SiriLeeLindskrog](https://forum.glyphsapp.com/letter_avatar_proxy/v4/letter/s/9fc29f/32.png) [@SiriLeeLindskrog](https://forum.glyphsapp.com/u/SiriLeeLindskrog)\
**Post date:** [January 2, 2025, 10:35am UTC](https://forum.glyphsapp.com/t/deactivate-opentype-feature-when-user-modifies-spacing/32424/3 "2025-01-02T10:35:19Z")

</div>

Hey Florian, thanks a lot for your reply.

For some reason i can’t export my font when the feature is moves to “Liga”. It then says “Unknown glyph found in feature line 1” etc.

I do not understand why it recognises the glyphs when the code is in Calt but not when in Liga.

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [January 2, 2025, 10:36am UTC](https://forum.glyphsapp.com/t/deactivate-opentype-feature-when-user-modifies-spacing/32424/4 "2025-01-02T10:36:53Z")

</div>

can you show your feature code?

---

<div class="post-metadata">

**Author:** ![SiriLeeLindskrog](https://forum.glyphsapp.com/letter_avatar_proxy/v4/letter/s/9fc29f/32.png) [@SiriLeeLindskrog](https://forum.glyphsapp.com/u/SiriLeeLindskrog)\
**Post date:** [January 2, 2025, 10:53am UTC](https://forum.glyphsapp.com/t/deactivate-opentype-feature-when-user-modifies-spacing/32424/5 "2025-01-02T10:53:30Z")

</div>

Yes the code is quite long, and calls several classes. My glyph naming might be a bit hard to understand, because there are very many alternates of each letter. I post a small part of it here.

 ![Screenshot 2025-01-02 at 11.52.46](https://forum.glyphsapp.com/uploads/default/original/3X/e/1/e123e7c41eeb8b1a2fe5888158a19e0c7deecf25.png)

---

<div class="post-metadata">

**Author:** ![FlorianPircher](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/florianpircher/32/30457_2.png) [@FlorianPircher](https://forum.glyphsapp.com/u/FlorianPircher)\
**Post date:** [January 2, 2025, 11:11am UTC](https://forum.glyphsapp.com/t/deactivate-opentype-feature-when-user-modifies-spacing/32424/6 "2025-01-02T11:11:12Z")

</div>

If the glyph for a given glyph name is missing, then the name should be underlined in red. That does not appear to be the case in your screenshot.

> [@SiriLeeLindskrog](#):
>
> I post a small part of it here.

Is this the top of your `liga` code or did you remove some code before taking the screenshot?

Or are you removing glyphs at export time with a “Remove Glyphs” custom parameter or something similar?

Either way, if the code worked in `calt`, it should work in `liga` as well.

---

<div class="post-metadata">

**Author:** ![SiriLeeLindskrog](https://forum.glyphsapp.com/letter_avatar_proxy/v4/letter/s/9fc29f/32.png) [@SiriLeeLindskrog](https://forum.glyphsapp.com/u/SiriLeeLindskrog)\
**Post date:** [January 2, 2025, 11:45am UTC](https://forum.glyphsapp.com/t/deactivate-opentype-feature-when-user-modifies-spacing/32424/7 "2025-01-02T11:45:23Z")

</div>

Hello.

Yes you were right, i had removed the glyphs and the feature in certain styles in the export, and now that i remembered and go back and also remove Liga in those styles, it’s no longer an issue.

In indesign the feature is now deactivating when i give the font positive spacing, thank you! However it still is active on negative spacing. Any ideas if there would be a way to solve this as well?

---

<div class="post-metadata">

**Author:** ![FlorianPircher](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/florianpircher/32/30457_2.png) [@FlorianPircher](https://forum.glyphsapp.com/u/FlorianPircher)\
**Post date:** [January 2, 2025, 12:55pm UTC](https://forum.glyphsapp.com/t/deactivate-opentype-feature-when-user-modifies-spacing/32424/8 "2025-01-02T12:55:57Z")

</div>

> [@SiriLeeLindskrog](#):
>
> However it still is active on negative spacing. Any ideas if there would be a way to solve this as well?

I don’t think there is anything you can do about that. Different apps will handle this differently; some disabling ligatures for both positive and negative spacing, some for one case, some in no case, and in any case at different thresholds.

---

<div class="post-metadata">

**Author:** ![SiriLeeLindskrog](https://forum.glyphsapp.com/letter_avatar_proxy/v4/letter/s/9fc29f/32.png) [@SiriLeeLindskrog](https://forum.glyphsapp.com/u/SiriLeeLindskrog)\
**Post date:** [January 2, 2025, 1:07pm UTC](https://forum.glyphsapp.com/t/deactivate-opentype-feature-when-user-modifies-spacing/32424/9 "2025-01-02T13:07:45Z")

</div>

Okay, thanks for you reply, i appreciate it!
