[FIXED] Duplication of Anchors

Post your bug reports here. Include information that helps us to understand and reproduce the bug.
Post Reply
PJMiller
Top Typographer
Top Typographer
Posts: 977
Joined: Tue Jun 16, 2015 8:12 pm
Location: Sheffield, South Yorkshire
Contact:

[FIXED] Duplication of Anchors

Post by PJMiller »

I have had a problem with the Munson font.

Following a discussion on TypeDrawers about the design of the German capital Sharp S character I made some changes to the design in Munson. Having changed the normal and bold fonts I copied these characters into the italic and bold-italic fonts and made them italic.

When I looked at these characters in the glyph editor three out of four of the anchors had been duplicated, possibly when the paste operation took place the original anchors were not cleared.

I went into Open Type Designer thinking this would clear things up. In Open Type Designer there was only one set of anchors and so I adjusted them to the correct positions for these characters. But when I went back to the glyph editor there were now three copies of the offending anchors.

Then I tried saving the fonts and closing the program thinking this might clear things up but it did not.

How do I get rid of them ?

Perhaps it might be helpful to have a test for duplicate anchors in the font validation.

I have attached the italic and bold italic fonts, it is the italic capital sharp S ( $1E9E ) and the small caps version of the same character also the bold italic font, just the capital sharp S ( $1E9E ), the small caps version is unaffected because the original character didn't have anchors attached at the time of pasting the new character.
Attachments
Munson_Italic.fcp
(182.74 KiB) Downloaded 365 times
Munson_BoldItalic.fcp
(174.68 KiB) Downloaded 346 times
PJMiller
Top Typographer
Top Typographer
Posts: 977
Joined: Tue Jun 16, 2015 8:12 pm
Location: Sheffield, South Yorkshire
Contact:

Re: Duplication of Anchors

Post by PJMiller »

I have found a workaround.

You have to delete the characters. Erasing the characters erases their contents but doesn't erase the anchors. You have to completely delete the character then create a new empty glyph and paste the copied character into that glyph (paste special works because then you can get all the metadata as well).

This bug seems to not affect the first anchor on a glyph just all subsequent anchors.
Erwin Denissen
Moderator
Moderator
Posts: 11108
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: Duplication of Anchors

Post by Erwin Denissen »

I do see them, but I don't know how to reproduce this issue, so it is hard to find a fix for it.
Erwin Denissen
High-Logic
Proven Font Technology
PJMiller
Top Typographer
Top Typographer
Posts: 977
Joined: Tue Jun 16, 2015 8:12 pm
Location: Sheffield, South Yorkshire
Contact:

Re: Duplication of Anchors

Post by PJMiller »

Try copying and pasting the same character from one font to another where both fonts have anchors (more than one) which are named similarly to each other.

However having said that the bug only occurs occasionally.

Good Luck ! :wink:
PJMiller
Top Typographer
Top Typographer
Posts: 977
Joined: Tue Jun 16, 2015 8:12 pm
Location: Sheffield, South Yorkshire
Contact:

Re: Duplication of Anchors

Post by PJMiller »

Previously I said the bug only occurred occasionally, aparently it depends on the circumstances. It used to be occasionally but I must have done something to my project which has changed that.

I hardly got the problem with the 'Munson' font but now with the 'Old Tobias' font it happens quite reliably. I don't know what I have done to the font to cause this change. :?

It is very reproducible, to cause the problem you copy a glyph which has anchors then paste it into another glyph which has anchors of the same name. The first anchor doesn't get duplicated, all the others are duplicated.

Sometimes it is not noticable at first if the anchors are exactly on top of one another but it can be a surprise when you move an anchor only to find that you now have two, the one you moved and the one in its original position. Sometimes when you have pasted the same glyph several times then you can get three or four (or n) anchors in the same place.

This circumstance can happen if you want to copy a glyph from an upright font and paste it into an italic font prior to slanting it. If the glyph you are pasting into had already got a glyph with anchors then the paste operation doesn't erase them and if they had the same names as in the glyph being pasted then they are duplicated (apart from the first one).

If the paste operation could be made so that either the anchors are cleared in the target glyph or if it could be made so that any anchors with the same names could be cleared before the paste operation then that would solve the problem.

FCB11_40.jpg
FCB11_40.jpg (1.18 MiB) Viewed 8032 times

In this picture I have moved one set to show that there are more than one.
Erwin Denissen
Moderator
Moderator
Posts: 11108
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: Duplication of Anchors

Post by Erwin Denissen »

I've seen it too, but I haven't been able to locate the real cause of this problem.
Erwin Denissen
High-Logic
Proven Font Technology
PJMiller
Top Typographer
Top Typographer
Posts: 977
Joined: Tue Jun 16, 2015 8:12 pm
Location: Sheffield, South Yorkshire
Contact:

Re: Duplication of Anchors

Post by PJMiller »

There were many duplicates in the Italic and Bold Italic fonts because whenever I made a change to the upright capitals I would propogate that change to the italic version, I didn't realise how many there were until I started investigating, they were hiding behind one another.

I don't know what effect having duplicates would have on the exported font file.

Getting rid of the duplicates by hand was too big a job so I cleaned each font by exporting it as an OTF file and then re-importing it. This got rid of the duplicates.

This has set all the Anchor names to things like Anchor1, Anchor2 ... etc thus the problem would happen again, but I have re-named them to be different in each font so this will not happen again.

I looked through the open type code and saw nothing unusual, no duplication. However the duplication persistent, if the font project is saved and the program is closed then the duplicates are still there when the font is re-loaded so there must be some data in the FCP file which contains the duplicated data, perhaps that would be a good place to look.

Also the fact that the first anchor is treated differently might be significant.

Perhaps something which ought to be happening to each Anchor when a glyph is pasted is only happening once.
Erwin Denissen
Moderator
Moderator
Posts: 11108
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: Duplication of Anchors

Post by Erwin Denissen »

PJMiller wrote: Wed Aug 09, 2017 9:54 amIt is very reproducible, to cause the problem you copy a glyph which has anchors then paste it into another glyph which has anchors of the same name. The first anchor doesn't get duplicated, all the others are duplicated.
I've found a bug which will be fixed with the next upcoming release.

Having more anchors shouldn't be an issue, but I'll see if I can come up with a solution for that as well.
Erwin Denissen
High-Logic
Proven Font Technology
PJMiller
Top Typographer
Top Typographer
Posts: 977
Joined: Tue Jun 16, 2015 8:12 pm
Location: Sheffield, South Yorkshire
Contact:

Re: Duplication of Anchors

Post by PJMiller »

I now have a workaround.

All the anchors have different names, Roman are prefixed with R_, italic with I_, bold with B_ and bold italic with Z_. If a glyph is copied to another font then the extra anchors are not linked and so can be deleted.

This wasn't a bad bug anyway because exporting the font to a .OTF then re-importing it cleared the duplicate anchors. Only the 'official' anchors were left. So when producing a font the font would only have one set and would work correctly but it was just confusing and annoying whilst editing the font because sometimes you don't know which is the 'official' anchor and which was the duplicate.

All subsequent fonts I produce will have the same naming convention.

But if you can sort it out then I'm sure it will be an improvement for the program.

Thanks for all your hard work. :D
Erwin Denissen
Moderator
Moderator
Posts: 11108
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: Duplication of Anchors

Post by Erwin Denissen »

Earlier today I released a private build with a fix for this.

If it turns out to work correctly, expect an official release next week.
Erwin Denissen
High-Logic
Proven Font Technology
PJMiller
Top Typographer
Top Typographer
Posts: 977
Joined: Tue Jun 16, 2015 8:12 pm
Location: Sheffield, South Yorkshire
Contact:

Re: Duplication of Anchors

Post by PJMiller »

I've just downloaded 2395, I will try it on a previous backup version of the font without the new names and let you know the results.

We are going shopping after the evening meal so it will have to be tomorrow morning before I try it out.
Erwin Denissen
Moderator
Moderator
Posts: 11108
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: Duplication of Anchors

Post by Erwin Denissen »

It will work 😊
Erwin Denissen
High-Logic
Proven Font Technology
PJMiller
Top Typographer
Top Typographer
Posts: 977
Joined: Tue Jun 16, 2015 8:12 pm
Location: Sheffield, South Yorkshire
Contact:

Re: Duplication of Anchors

Post by PJMiller »

I have not been able to reproduce the error with the latest version. It appears to be fixed.

It is good that it has been fixed because the default naming of anchors is 'Anchor_1' , 'Anchor_2', etc ... so it is likely that other people would have encountered this problem if they started using anchors.

Thank you. :D
Post Reply