Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question about mark to ligature index number #223

Open
aminabedi68 opened this issue Jul 31, 2023 · 7 comments
Open

question about mark to ligature index number #223

aminabedi68 opened this issue Jul 31, 2023 · 7 comments

Comments

@aminabedi68
Copy link

Hi
i'm working with fontforge to create a variable font.(fontforge→UFO+designspace→fontmake→VF)
fontforge generate UFOs with no index number for ligature anchor marks like this(in features.fea):

  pos ligature \uniFEFC <anchor 977 4> mark @Anchor0 
    ligComponent
      <anchor 335 4> mark @Anchor0 ;

the glyph in fontforge GUI:

fontforge_UewJUOIppP

this situation triggers warning in fontmake:

WARNING:ufo2ft.featureWriters.markFeatureWriter.MarkFeatureWriter:duplicate anchor 'Anchor0' in glyph 'uniFEFC '

although the generated VF still working, but if i want to interpolate an instance the result will be like:

fontforge_tfOsmIWLm9

i tried to solve the problem by regex search and replace for @Anchor0 and @Anchor2 in those lines with appending an index to be like(for@Anchor0): @Anchor0_0 and @Anchor0_1 or @Anchor0#0 and @Anchor0#1 but it's not working. i thought the problem was from indexing but something is still wrong. so what is wrong according the ufo spec?

@LettError
Copy link
Contributor

Do you mean the glyph picks up duplicate anchors along the way?

@aminabedi68
Copy link
Author

I'm not sure I understand you correctly, the issue comes from fontforge(with putting no index to ligatures anchors marks), apparently the fontforge developers don't know what is the right way according the ufo spec. it cause some problems in interpolation and if i open the interpolated ufo with fontforge, it couldn't pars those anchors. i'm trying to do some python hack between to fix it but don't know how. i prefer to solve my problem in first priority but also give a hint from you to fontforge developers to fix it in future releases.

@anthrotype
Copy link
Member

the UFO spec doesn't currently attach any particular meanings to anchor names, so this can be regarded as a tool issue. I suggest you redirect this to ufo2ft repository

@aminabedi68
Copy link
Author

i don't think so @anthrotype , because even when fonforge directly generates UFO from its own SFD sources, i mean even without interpolation, ligatures anchors marks are not the same:

fontforge SFD source(two Anchor0 and two Anchor2):
fontforge_DvvDllRFKc

fontforge opened its own generated UFO:
fontforge_3G06NjF026

i think it's related to some kind of wrong implementations from fontforge side.

@anthrotype
Copy link
Member

The UFO spec as such is silent about how anchor should be named for generating mark or mkmk features, there's only a brief mention of anchor naming convention for ligature carets.
So fontforge is not implementing anything "wrong" because there's no official rule. We can try to come up with some shared behavior but as of now, the UFO specification does not specify this.

@moyogo
Copy link
Collaborator

moyogo commented Jul 31, 2023

Fontforge not being consistent between its exported UFO and its own SFD is problematic and should be fixed.

Have you tried using sfdLib?

@aminabedi68
Copy link
Author

aminabedi68 commented Jul 31, 2023

@moyogo
sfdLib not working for this case. (I don't know sfdLib has this issue or not at all, will check it with another project)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants