Can I use utf8 characters in script menuTitle strings?



  • I'm making a small tool for controlling glyph marks, and I would like to include emoji in the menuTitle of each script. I'm trying to do so like this:

    # menuTitle : 02: Needs Feedback - Yellow 🎾
    # shortCut  : command+control+shift+2
    
    # menuTitle : 03: Experiment - Purple 👾
    # shortCut  : command+control+shift+3
    

    I've also tried a string:

    # menuTitle : '05: Built from Components - Blue 🌐'
    # shortCut  : command+control+shift+5
    

    ...etc. This would be a handy way to visually indicate the result of each script (and to make the color logic memorable).

    However, the results are garbled, possibly due to these titles only supporting ISO 8859-1 (or something similar):

    b12ac962-00bf-4f6d-93f1-2cf281909d66-image.png

    I do see that the extension EditThatNextMaster uses emoji in its menu titles, so it seems tantalizing close to being possible:

    87697ffd-c156-42e8-b66f-e200c96b87e1-image.png

    However, I do see that EditThatNextMaster achieves this with the following code:

    # scripts which should appear in Extensions menu
    B.addToMenu = [
        {
            'path' : 'editThatNextMaster.py',
            'preferredName': '⏩ Next Master',
            'shortKey' : (1179648, ']'),
        },
        {
            'path' : 'editThatPreviousMaster.py',
            'preferredName': '⏪ Previous Master',
            'shortKey' : (1179648, '['),
        },
        {
            'path' : 'editShuffle.py',
            'preferredName': '⏪ Shuffle',
            'shortKey' : '\'',
        },
    ]
    

    Is something similar available to scripts? Or possibly, is this a quick fix in RoboFont? To support emoji on a website, you simply have to set a page's encoding to utf-8. In an application, I could imagine it being either just as easy or much harder to do. ¯\_(ツ)_/¯

    Or, is this just something that requires a tool to be packaged into an extension?


  • admin

    hi @StephenNixon, thanks for request. I’ve created an issue for this, I think it’s an easy fix.


  • admin

    should be fixed in the next update!

    thanks


  • admin

    and this is idd super cool!!

    Screen Shot 2019-07-13 at 17.03.30.png



  • Amazing, thanks!