Page 1 of 1

Problem with Code Editor in Open Type Designer

Posted: Thu Mar 28, 2019 6:13 pm
by PJMiller
I have created two Classes in Open Type Designer. One called '@Basic_Base' which contains a list of all the base characters which have all the anchors. The other is called '@Cyrillic_Base' which contains a list of Cyrillic characters which have a restricted set of anchors.

Whenever I open the code in the Code Editor it replaces these two classes with one class called '@M2B_B__A' which seems to be a merge between the two classes it replaces. A syntax check complains that there are one or more unreferenced classes (which are the ones it has replaced).
FC_OTD_class_problem.jpg
FC_OTD_class_problem.jpg (1.39 MiB) Viewed 471 times
What is going on here ?

Can I not place more than one class into the Mark to Base open type feature ?

Re: Problem with Code Editor in Open Type Designer

Posted: Thu Mar 28, 2019 8:31 pm
by Erwin Denissen
Positioning code doesn't use all classes as shown in the OpenType Designer. Only classes that are actually used within the OpenType feature code will be compiled into the font.

Re: Problem with Code Editor in Open Type Designer

Posted: Thu Mar 28, 2019 9:17 pm
by PJMiller
I created two classes with names I could understand.
When exported to a font the diacritic marks are correctly positioned in Libre Office and Page Plus.

If I open Code Editor it discards my named classes and creates a new class with a name which to me is less understandable without asking. Then brings up a warning about unused classes.
If exported to a font the diacritic marks are correctly positioned in Libre Office, I have not tested them in Page Plus but there is no reason to suppose they will not work there as well.

The point is that opening Code Editor re-writes my code in ways I did not expect.

Re: Problem with Code Editor in Open Type Designer

Posted: Thu Mar 28, 2019 9:59 pm
by Erwin Denissen
That is exactly what I tried to confirm. Source and Binary are not 100% exchangeable. Right now there is not much we can do about it, as it is by design.

If you open a font with OpenType features and recompile it, you'll notice FontCreator is actually very smart at finding and eliminating irrelevant parts of OpenType layout features that are never used within a font.

Re: Problem with Code Editor in Open Type Designer

Posted: Thu Mar 28, 2019 10:30 pm
by PJMiller
So it combines the classes, I can live with that. Sorry to cause a fuss.

No problem. I didn't understand what it was doing and why.

Re: Problem with Code Editor in Open Type Designer

Posted: Thu Mar 28, 2019 10:51 pm
by Erwin Denissen
I'm not saying it combines them; I'm just saying it tries to be smart :D