question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Duplicate glyph in class

See original GitHub issue

This works in feaLib and makeotf:

@foo = [A A];
feature kern { pos @foo 10; } kern;

This works in makeotf (with a warning) but errors in feaLib:

@foo = [A A];
feature kern { pos @foo 10 @foo; } kern;

Admittedly it’s bad code, (harder for a user to spot when there are thirty other glyphs between the first and last occurrence) but there is something sensible that can be done with it, so we should.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
justvanrossumcommented, Feb 17, 2021

Yes, at the .fea level, duplicates are allowed and useful, even for single substitutions:

feature ss01 {
	sub [a b c] by [Z Z Z];
} ss01;
0reactions
BoldMondaycommented, Feb 17, 2021

What about cases of many-to-many substitutions where the length of both classes needs to be the same?

If a duplicate glyph is ignored you might get a compilation error that doesn’t really point to the actual problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Export failure: Duplicate definition of glyph class @MMK
I can export an older version of the font, but the one where I'd done all the metrics fixes is still not exporting...
Read more >
Duplicate class attributes in one HTML file - Stack Overflow
We want to cover the 13 classes all in one HTML file. It's handy. My problem: Some classes have identically named attributes (see...
Read more >
glyphicon-duplicate - HTML CSS - Java2s.com
Duplicate Glyph. Duplicate icon: Duplicate icon as a link: Duplicate icon on a button: Duplicate. Duplicate icon on a styled link button: Duplicate....
Read more >
Working with Glyphs - FontLab Help Center
Duplicating Glyphs » ... To duplicate glyphs, select glyph cells in the Font window and use the Edit > Duplicate ( Cmd D...
Read more >
Components - Bootstrap
Includes over 250 glyphs in font format from the Glyphicon Halflings set. ... For performance reasons, all icons require a base class and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found