[1.6] Crash when template glyphs with unicode > 0xffff should be displayed

RoboFont Forums Bugs [1.6] Crash when template glyphs with unicode > 0xffff should be displayed

This topic contains 7 replies, has 4 voices, and was last updated by  frederik 1 year, 3 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #6020

    Jens K.
    Participant

    I have an UFO with empty glyph cells with high unicode values. RoboFont crashes when trying to open the UFO.

    E.g. u1F30E u1F311

    I believe the offending line is

    t = unichr(self.glyph.unicode) in glyphCellFactory.py

    This is pretty bad because it worked in RF 1.5.1, but 1.5.1 doesn’t work in Yosemite …

    #6021

    Jens K.
    Participant

    The console log is:

    06.11.14 18:20:28,075 RoboFont[4880]: *** Terminating app due to uncaught exception 'OC_PythonException', reason: '<type 'exceptions.ValueError'>: unichr() arg not in range(0x10000) (narrow Python build)'

    #6022

    frederik
    Keymaster

    He Jens

    can you send me the ufo? I cannot reproduce it…
    you can also try to launch RoboFont 1.6 with shift down, it will launch without installing any extension.

    good luck!

    #6023

    Jens K.
    Participant

    Hi Frederik, here’s a demo UFO …

    Meanwhile, I was able to work around the issue by editing my problematic UFO by hand.

    Attachments:
    You must be logged in to view attached files.
    #6228

    Robin Mientjes
    Participant

    This same crash happens to me now. The moment I fixed some Shavian character Unicodes, I started getting crashes whenever it needed to lead the template glyph. 1.6, OS X El Capitan.

    #6229

    Anonymous

    Hey, nice thing someone posted it yesterday cause I actually have the same issue right now !

    I took an OTF, opened it in Robofont, deleted the characters I didn’t need to only keep the ones I wanted. Then I saved that OTF as an UFO. After that I’ve opened that UFO and deleted the content of the previous OTF to only keep the empty cells I needed. Then, I’ve setted that UFO as my default character set so everytime I make a new file it’ll open that empty custom UFO.

    But everytime I make a new file in robofont, it crashes after like maximum 5 seconds. I still can open my basic UFO without any issues but as default character set it crashes robofont.

    How can I fix this ?

    Thanks,

    Olivier

    Edit : 1.6, El Capitan too.

    #6230

    Jens K.
    Participant

    The crash is only caused for template glyphs that are not in the font.

    You could try to open the UFO without GUI, and then actually add the glyph to the font, so no placeholder will be displayed anymore:

    f = OpenFont("/path/to/the.ufo", showUI=False)
    
    for glyphname in f.lib["public.glyphOrder"]:
        if glyphname.startswith("u") and int(glyphname[1:], 16) > 0xffff:
            if not glyphname in f:
                f.newGlyph(glyphname)
    f.save()
    
    #6231

    frederik
    Keymaster

    This is already solved in the upcoming release

    even support for emoji as a template preview :)

    Attachments:
    You must be logged in to view attached files.
Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.