About the existence of the anchors in .otf

mauro sacchettomauro sacchetto Posts: 353
edited January 2022 in Font Technology
Since I have been working on Linux for many years, but now have a MacBook Pro, I have installed Glyphs (which is much better integrated into the system than FontForge). I then opened / imported an .otf (Glyphs does not manage FontForge's .sfd sources). One of the problems I encountered is that all anchors are lost. In the Glyphs forum I was told that this is normal, because there are no anchors in the compiled .otfs. However the answer does not convince me, because I did a little test: I opened any .oft that uses anchors, in this case SourceSansPro, with Fontlab7. The anchors are visible and editable:
Then, I opened the same .otf with FontForge and, also in this case, the anchors are visible and editable:

Finally, I opened it with Glyphs, and there is no trace of the anchors:

I believe many people on this forum use Glyphs. Is it really the only font editor that can't import / read anchors?
Thank you



  • Florian PircherFlorian Pircher Posts: 169
    edited January 2022
    There are attachment points in the exported font data, but they do not map 1-to-1 to the anchors as seen in the editing view. This makes them tricky to import without introducing subtle bugs. Glyphs 3 can represent contextual anchors directly in Edit View, and future additions to the anchor metadata are planned, so one day importing of attachment points to anchors may be supported.

    In general, we recommend always working from sources, not exported files. There are more things than just the attachment points that get lost when using an OTF as a source document. Instead, convert the .sfd to an exchange format such as UFO and open that in Glyphs.
  • So currently it is a limitation of Glyphs, not the fact that this information (apart from the fact that the import from an .otf is always imperfect). In any case, it would be significant for Glyphs to fill this gap, as other font editors somehow know how to handle anchors. I understand that importing an .otf is not the best method, but I have a .sfd and a .otf. Now I will do a careful test from .sfd to UFO, even if I think I have already tried and in any case in Glyphs I still could not find the anchors. Thank you
  • I have a Python script which adds anchors, kerning, and other layout feature code from an OTF binary (or multiple OTF binaries) into a Glyphs source. Install the Python module fontFeatures==1.5.0 and find it here.

    I use it like this:
    python3 otflayout2glyphs.py --output=src/NotoSansDevanagariNew.glyphs src/NotoSansDevanagari/NotoSansDevanagari-MM.glyphs NotoSansDevanagari-Light.ttf NotoSansDevanagari-Regular.ttf NotoSansDevanagari-Bold.ttf ... NotoSansDevanagari-ExtraCondensedBlack.ttf

    Note that you pass in an existing Glyphs file, and OTF files for each master in the Glyphs source.
  • mauro sacchettomauro sacchetto Posts: 353
    edited January 2022
    It seems great! Thank you
    Does the procedure consist simply in running the script towards the otf still "closed" and then in importing / opening it with Glyphs?
    However, it would be desirable that several functions were introduced into the program itself

  • I’ve made a Glyphs plugin to import SFD files, but I think I didn’t implement the import of anchors:


    (as I just wanted a quick way to look at the design of a FF file)

    Anchor import should be easy to add though.
  • Sorry, I missed the reply. Now I see the plugin. I also have to try exporting the .fea file from FF to check if it is properly imported into Glyphs. Thank you!
Sign In or Register to comment.