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:
[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:
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:
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:
Syntax error: "pos" expected but "}" found
Steps to reproduce
- Open the attached font/project in FontCreator 16.0.
- Open OpenType Designer.
- Open the affected
MarkToBaselookup. - Open its Code Editor.
- Do not modify anything in the code.
- Click OK.
- FontCreator attempts to compile the code and reports:
[Error] (29: 3): Syntax error: "pos" expected but "}" found
- 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:
- empty subtables cannot produce syntactically invalid OTLFD code;
- opening the Code Editor and pressing OK without editing does not unexpectedly fail;
- non-fatal anchor warnings do not prevent saving when the underlying code is otherwise valid;
- the compiler and visual OpenType Designer agree on what constitutes a valid empty subtable;
- 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.


