I'm using Fontlab 7 (7.2.0.7649) on Windows to create a Thai font. I created 3 glyphs with several anchors named as follows.

After I generated mark and mkmk features using the auto features by Fontlab, here is the result when I combined those 3 glyphs (in order from left to right of the image above) together and turned the mark and mkmk features on. It seems that top anchor is attached to bottom.

What I expect is the following.

And I also expect it to be able to do the following.


What was wrong here? What should I do to achieve the expected result?
I'm fairly new to type design. Thank you in advance for your reply.
Comments
What should be happening is that mark feature lookups have process mark filters set so that the lookup for the top marks only processes top marks, and the lookup for bottom marks only processes bottom marks. If the lookup for top marks is not filtered in this way, then the presence of the bottom mark interferes with the positioning of the top mark on the base.
Unless there are settings for this, I suspect that this is a Fontlab bug. I tried the same thing on Glyphs, exactly the same naming of anchors, and there is no problem at all.
I will try to file this issue to Fontlab support and see if this is a bug or I simply misconfigured something.
I tried comparing features generated by Fontlab to Glyphs and 'mark' is nearly identical while 'mkmk' is significantly different.
I found out that Glyphs is doing something behind the scene at the time of feature generation–it creates an additional set of anchors at the same position and it uses one set for mark and another set for mkmk while Fontlab uses the same name of anchors for both mark and mkmk features.
Not sure what is the significance of that, but anyway I got more info for their support team.
I would encourage you to address your demand on the Fontlab 7 forum where I'm sure you will receive an explanation. The Fontlab Team and the users are very helpful.
I'm using Autolayer recipes in FL7 to create diacritics.
- To create a Vietnamese diacritic as Abreveacute where you have 2 accents, breve and acute, I found it easier to first create a "breveacutecomb" and then to use the recipe "A+breveacutecomb", with a "_top" anchor on "breveacutecomb".
I think I did it that way because I found it difficult to link 3 elements. I have no explanation for this.Hope this helps you!
The formula in Autolayer "a+breve+dotaccent" gives the desired result. The same with "a+dotaccent+breve".
So you can link 3 elements (contrary to what I believed and mentioned here).
About mark and mkmk features, I'm totally ignorant!
I tried fontmake and it works! It does the same behavior as Glyphs which I expected. So basically I have to adapt my workflow by lifting the mark/mkmk feature generation to fontmake in the meantime. Thank you for mentioning fontmake.
I appreciate the guide for Latin and Vietnamese diacritic as well. I wanted to include those scripts soon, so your replies are very helpful.
About mark and mkmk, I believe they (along with ccmp) are the only standard way to implement shaping logic for Thai scripts, so I really need to get them to work.
I will try mentioning this in detail to FontLab team when I have time and see if there is a way to make it works inside FontLab. I will keep this post updated if I got a reply.