# Code Editor fails compilation even when no changes have been made

**URL:** <https://forum.high-logic.com/t/code-editor-fails-compilation-even-when-no-changes-have-been-made/13638>\
**Category:** FontCreator - Bug Reports\
**Created:** [September 8, 2026, 4:32am UTC](https://forum.high-logic.com/t/code-editor-fails-compilation-even-when-no-changes-have-been-made/13638 "2026-09-08T04:32:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![faisal.quadirey](https://forum.high-logic.com/letter_avatar_proxy/v4/letter/f/e0b2c6/32.png) [@faisal.quadirey](https://forum.high-logic.com/u/faisal.quadirey)\
**Post date:** [September 8, 2026, 4:32am UTC](https://forum.high-logic.com/t/code-editor-fails-compilation-even-when-no-changes-have-been-made/13638/1 "2026-09-08T04:32:25Z")

</div>

**Subject:** Bug Report: OpenType Designer Code Editor Cannot Save Unedited Code Because of Auto-Generated Invalid `pos` Syntax

**FontCreator:** 16.0.0.3080 (64-bit)  
**Module:** OpenType Designer / OpenType Layout Feature Code Editor (OTLFD)  
**Lookup:** `SmallLettersToBase1` (`mark`)  
**Issue:** Code Editor fails compilation even when no changes have been made

### Description

I have encountered a serious usability/compilation bug in FontCreator 16.0.0.3080 (64-bit).

The OpenType Designer contains a `MarkToBase` lookup with several subtables. When I open the **Code Editor** and make **no changes whatsoever** , simply clicking **OK** causes FontCreator to compile the existing/generated code and report an error:

```plaintext
[Error] (29: 3): Syntax error: "pos" expected but "}" found
Failed to compile the code. See the output for more information.

```

The important point is that **I did not edit the code**. I opened the Code Editor and pressed **OK** immediately. Therefore, the Code Editor is effectively being asked to compile/save code that FontCreator itself generated or reconstructed from the existing OpenType Designer data.

The relevant generated code contains subtables such as:

```otlfd
subtable "Subtable 5" {
    anchor NuqtaTop1;
    mark "smallhighmeemisolatedformcomb-arab" NULL;
}

subtable "Subtable 6" {
    anchor NuqtaTop1;
    mark "smalllowmeemcomb-arab" NULL;
}

```

These subtables contain no `pos` statement because they currently have zero base-glyph entries. The compiler nevertheless appears to require a `pos` statement before the closing `}` and consequently rejects its own generated code.

There are also several warnings such as:

```plaintext
No anchor defined for glyph "arabicatweelmod"
No anchor defined for glyph "smallhighmeemisolatedformcomb-arab"
No anchor defined for glyph "reh-arab"
...

```

However, the **fatal problem is the syntax error** :

```plaintext
Syntax error: "pos" expected but "}" found

```

### Steps to reproduce

1. Open the attached font/project in FontCreator 16.0.
2. Open **OpenType Designer**.
3. Open the affected `MarkToBase` lookup.
4. Open its **Code Editor**.
5. **Do not modify anything in the code.**
6. Click **OK**.
7. FontCreator attempts to compile the code and reports:

```plaintext
[Error] (29: 3): Syntax error: "pos" expected but "}" found

```

1. The Code Editor cannot be accepted/saved because compilation fails, leaving **Cancel** as the practical way to close the editor.

### Expected behavior

Clicking **OK** without making any changes should not cause an otherwise existing OpenType Designer configuration to become impossible to save.

More importantly, the Code Editor should **never generate or reconstruct syntactically invalid OTLFD code that its own compiler immediately rejects**.

If an empty subtable is considered invalid, FontCreator should handle it gracefully. For example, it could:

- omit empty subtables from generated OTLFD code;
- automatically remove/ignore empty subtables;
- preserve the existing designer data without attempting to compile an invalid empty block;
- issue a non-fatal warning and allow the user to save;
- or provide a clear way to repair the subtable without forcing the user to cancel the entire Code Editor operation.

### Additional concern

The current behavior is particularly problematic because **the user is not required to make an error through editing**. Merely opening the Code Editor and pressing **OK** is enough to trigger the failure.

This means the Code Editor is not functioning safely as a round-trip editor:

**Open existing configuration → Code Editor → OK → compilation failure**

A user should be able to open and close the Code Editor without modifying anything and without FontCreator introducing a new compilation failure.

### Request for a permanent fix

Please investigate the Code Editor’s conversion/generation of `MarkToBase` subtables, particularly subtables containing anchors/marks but zero base-glyph entries.

I would appreciate a **permanent fix in FontCreator** so that:

1. empty subtables cannot produce syntactically invalid OTLFD code;
2. opening the Code Editor and pressing **OK without editing** does not unexpectedly fail;
3. non-fatal anchor warnings do not prevent saving when the underlying code is otherwise valid;
4. the compiler and visual OpenType Designer agree on what constitutes a valid empty subtable;
5. most importantly, the application does not leave the user with **Cancel as the only way out** merely because its own generated code cannot be compiled.

I have attached screenshots showing the affected OpenType Designer subtables, the generated OTLFD code, and the compilation error.

**Please consider this a Code Editor/compiler integration bug rather than simply an invalid-font-data issue, because the failure occurs without the user making any code changes.**

 ![Screenshot 2026-09-08 091551](https://forum.high-logic.com/uploads/default/original/2X/5/5adbea53fa5ab510721381b7d5bf9f5a88dab5ee.png)

 ![Screenshot 2026-09-08 091513](https://forum.high-logic.com/uploads/default/original/2X/a/adac9c4c8b78ffbb80fa46a21cf194ca91162575.png)

 ![Screenshot 2026-09-08 091435](https://forum.high-logic.com/uploads/default/original/2X/f/fc046032407cbf13f21847a15ad973d0bf40bb4f.png)

---

<div class="post-metadata">

**Author:** ![ErwinDenissen](https://forum.high-logic.com/user_avatar/forum.high-logic.com/erwindenissen/32/9430_2.png) [@ErwinDenissen](https://forum.high-logic.com/u/ErwinDenissen)\
**Post date:** [September 14, 2026, 4:18am UTC](https://forum.high-logic.com/t/code-editor-fails-compilation-even-when-no-changes-have-been-made/13638/2 "2026-09-14T04:18:17Z")

</div>

As mentioned in the user manual, OTLFD is obsolete. We introduced this syntax years ago, but since most font designers are familiar with the AFDKO FEA feature syntax, we have decided to no longer maintain this syntax.

We will remove it from FontCreator soon. Use fea instead.
