Bug Report

As I tried to export, I got this error message (tried it multiple times)

cmap{plat=3,script=1,lang=0}: multiple glyphs uni06C1.fina uni06C1 mapped to code <6c1>

Is it a known Problem and how could I fix it?

Thanks in advance!

How did you create those two glyphs?

This error message tells you that you have two glyphs with the same Unicode in your font. This happens sometimes when you import a font. Search for 06c1 in font view select the one glyph with the fina suffix and choose Font > update glyph info. This should remove the Unicode.

I did exactly that. Now I get this error:

Error: invalid token (text was " ")

In File > Font Info > Features, re-generate the feature code by clicking on the arrow button at the bottom.

Or you have a space in a glyph name.

What version do you have?

Thank you mekkablue but it didn’t fix the problem. Still getting the same error.

Thank you George, I have version 1.3.17.
It’s a crazy amount of Glyphs. Is there a quick way to search threw all of them for spaces?

can you put this in the macro panel:
for g in Font.glyphs:
if " " in g.name:
print “there is a space in:”, g.name

(replace with a tab key)

Best
Georg

Georg:
I noticed that you cannot get a glyph name with a non-ASCII character through thisGlyph.name unless you add “# encoding: utf-8” at the beginning of GlyphsApp.py

Also, non-ASCII Unicode chars are escaped with “\Uxxxx”, but they should be escaped with “\uxxxx” (small “u”). This can be fixed with a simple replace() though.

Here’s the slightly more complicated script I came up with:
http://pastebin.com/FL4DSgBZ

I must admit, I am a little overwhelmed now.

I tried to copy paste the script to the panel George (and replaced the “” with real tabs…but it didn’t seem to change anything.

I still get the same message after an export.

Same with your code mekkablue. I got this message after copy/pasting it:

Traceback (most recent call last):
File “”, line 10, in
NameError: name ‘firstChar’ is not defined

I really appreciate your help so far, but for now it didn’t work for me (at least I tried a few times and think I did it correct).

Is there something else I can try?

Did you click the Run button? What did it say in the lower part of the window?

There was a typo in the original script. But this is now corrected. Please try again.

The scripts are not supposed to change anything, by the way. They just report bad glyph names into the lower half of the macro window.

Hey George, it says:

File “”, line 1
if " " in g.name:
^
IndentationError: unexpected indent

when I run this:

if " " in g.name:
print “there is a space in:”, g.name


Hey mekkablue

it still says:

Traceback (most recent call last):
File “”, line 10, in
NameError: name ‘firstChar’ is not defined

Argh sorry, seems like I corrected one but introduced another typo. Now it should work… I hope :slight_smile:

Indentation errors can occur when tabs and spaces are mixed. Is there really only one tab and no space before the “if”?

Hey mekkablue…first of all, I am the one who wants something, so I would never blame you for any mistakes :wink:

When I copy/paste your code now, I don’t get anything in the lower part of the macro panel window…?

I checked all the Tabs for spaces in the code, but there are none.

Could you send us the font that we can have a look?

Just to let other members know. I sent the file to George, now it works. But it was an other problem than expected. Thanks again.

There was a bug importing font info in the wrong format. This is fixed in the the last couple betas already. So retyping the designer and manufacturer in font info solved the problem.

The latest version also showed a much better error message that clearly pointed to the problem.

Hi all. I’m having a similar issue to the one described above. When trying to compile contextual alternative glyphs i receive the following error message:

Error: “invalid token (text was “?”)” in Feature calt in line: 1

I have tried all of the above to no avail. I’m using Version 2.3 (895) on a 30 day free trial. Can anyone help me work this out?

Thanks in advance.

You might have typed a curly quote instead of a strait quote. You need to right click the feature code text view and disable smart quotes.