How does anchor corresponds to glyph positioning feature in Fontlab 7?

thanathana Posts: 4
edited April 2022 in Type Design Software
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

  • John HudsonJohn Hudson Posts: 2,955
    It looks like the bottom mark is interfering with the positioning of the top mark, which indicates that the mark feature lookups are not filtered by mark class. I don’t use FL7’s built in mark code generation, so am not sure how it works, but have seen similar problems in other fonts and from other tools.

    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.
  • thanathana Posts: 4
    I think you're right.

    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.


  • thanathana Posts: 4
    edited April 2022
    Somehow I now believe that this is a problem with 'mkmk' feature generation in Fontlab.

    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 generationit 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.
  • Glyphs does what @John Hudson described: filtering for top marks in the top mark lookups and for bottom marks in bottom mark lookups. (But only for a selection of scripts, although we might might remove that condition in the future.) Fontmake does the same for all scripts. Not sure how FontLab is handling mkmk.
  • Yves MichelYves Michel Posts: 151
    I'm using Fontlab 7.
    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.
    • No problem with something like "A+acutecomb" to create Aacute: A "top" anchor on A and a "_top" anchor on acutecomb.
    • 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!
  • Yves MichelYves Michel Posts: 151
    Making new experiments with the letter "abrevedotbelow":
    • a glyph named "a" with a "top" anchor above and a "dotaccent" anchor below (other anchors present but don't interfere)
    • a glyph named "breve" with a "_top" anchor (no other anchor!)
    • a glyph named "dotaccent" with a "_dotaccent" anchor (no other anchor!)

    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!
  • thanathana Posts: 4
    I appreciate all replies and suggestions.

    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.
Sign In or Register to comment.