Page 1 of 1

[FIXED] Using Code Editor removes all Base anchors

Posted: Tue Dec 20, 2022 5:27 pm
by chunkyRice
For positioning all diacritical marks in my font, I use anchors. All anchors are positioned in such a way that I never have to adjust the positioning of individual marks. Using Complete Composites > Anchor Based will get it right every time.

Whenever I use the Code Editor (in the Open Type Designer) and change anything, thus forcing FontCreator to reparse the code, it removes all Base anchors. All the Mark anchors are left untouched.

(I'm using FontCreator 14.0.0.2898)
(It's very similar to this topic: viewtopic.php?p=47993&hilit=anchor#p47993".)

Re: Using Code Editor removes all Base anchors

Posted: Wed Dec 21, 2022 1:06 pm
by Erwin Denissen
Yes, this is correct but sometimes undesired behaviour. When you compile your feature code, it will replace all OpenType layout features, including all anchors.

We have considered merging them with existing anchors, but so far we haven't investigated it enough to know the actual impact.

Re: Using Code Editor removes all Base anchors

Posted: Wed Dec 21, 2022 5:07 pm
by chunkyRice
Isn't the automatic removal of unrelated code without an explicit request of or approval by the user always undesired? There's probably a technical reason why you've decided to do this but from a practical point of view it's not only a mystery but also extremely impractical. Why would you force users to choose between using OpenType Features and automatically positioning diacritical marks? The two are both unrelated and essential.

Moving on to a possible solution, is there a way I can add the base anchors to the features code? And if so, is there a way to extract this code so I don't have to type it all by hand?

Re: Using Code Editor removes all Base anchors

Posted: Wed Dec 21, 2022 5:38 pm
by Erwin Denissen
Actually it is related, but maybe not obvious.

You can generate anchor based features. Click the upper left toolbar icon on the OpenType Designer and check the first box ;-)

Re: Using Code Editor removes all Base anchors

Posted: Thu Dec 22, 2022 4:14 pm
by chunkyRice
Just added Anchor Based Positioning to the OT Features by clicking the button in the top left corner, like you suggested, and that solved the problem. All the marks I created were automatically added to the features code and when I pressed Ok everything was fine.

The amount of code has almost doubled in size, so maybe that's why you shied away from doing it automatically, but at least this is a solution. Simply disregarding all base marks and destroying hours of hard work without notice certainly isn't. Fortunately I noticed before saving (and saving again, also overwriting the backup file).

For future versions you may want to consider at least warning the user in advance before pressing the Ok button, offering to generate the code so nothing is lost. Personally I would prefer the automatic generation of the code as soon as you add these marks using the GUI.

Thanks for the help.

Re: Using Code Editor removes all Base anchors

Posted: Thu Dec 22, 2022 5:40 pm
by Erwin Denissen
chunkyRice wrote: Thu Dec 22, 2022 4:14 pm Just added Anchor Based Positioning to the OT Features by clicking the button in the top left corner, like you suggested, and that solved the problem. All the marks I created were automatically added to the features code and when I pressed Ok everything was fine.
Great!
chunkyRice wrote: Thu Dec 22, 2022 4:14 pm For future versions you may want to consider at least warning the user in advance before pressing the Ok button, offering to generate the code so nothing is lost. Personally I would prefer the automatic generation of the code as soon as you add these marks using the GUI.
FontCreator is the only font editor that does not change or flush OpenType layout features on opening existing fonts, and we like to keep it that way, as it would ruin a font with complex script like Arabic.

Also, we see numerous fonts generated through other font editors that come with unwanted mark-to-base and mark-to-mark items. The font designer just isn't aware of it, as the features are generated on export. We use a different approach which obviously also has drawbacks.

We will do some R&D related to merging anchors. I will keep you posted.

Re: Using Code Editor removes all Base anchors

Posted: Sun Dec 25, 2022 7:31 pm
by Erwin Denissen
We have implemented the merge with this update:

FontCreator 14.0.0.2900 (64-bit)

It also comes with:
- improvements to the validation features
- improved curve selection
- improved union, intersection, and exclusion of contours.
- added groups and kerning to the UFO export

Let us know your results.