Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[solved] ☹

edited September 2013 in OpenSesame

in short, how do I get this guy: "☹" (u"\u2639") into a (text) canvas?
I tried a lot of things, but nothing seemed to work. I was impressed with how effortlessly OpenSesame handled all of my other non-ASCII characters, but somehow, this guy I can't get hold of, all I get is a garbled mess from some translation table. Thanks!


  • edited 1:29AM

    Hi Jona,

    It appears that the smiley faces are not part of the Droid fonts that OpenSesame uses by default. But it should work fine if you switch to another font, such as Arial, which does contain these characters (through 'other' in the font selection box)

    Does that help?


  • edited September 2013

    No, I had already tried a bunch of fonts, including Arial. It works in the Debug Window by the way.

    BTW, here's my canvas:

    frowny = u"\u2639"

    Thanks Sebastiaan!

    Edit, to clarify: neither the line that's commented out nor the other one work, with Arial or any other font I tried.

  • edited 1:29AM

    The frowney face appears to be a pretty rare character. I initially tried it with the smiley face (u264A) which is part of Arial, but the frowney face is indeed not. The only font that I can find that contains the frowney is 'Courier New'. For me, this script shows a frowney face:

    from openexp.canvas import canvas
    c = canvas(exp)
    c.set_font(style='Courier New')
    c.text(u'smiley: \u263A frowney: \u2639')

    PS. like most modern toolkits, the OpenSesame GUI uses a fancy font-matching algorithm that picks missing characters from alternative fonts. That's why a character often appears fine in the GUI, but turns out to be missing when you actually run the experiment.

  • edited 1:29AM

    Funny, using Courier New (Mac OS 10.7), I only get the smiling smiley, not the frowney (he's still a box). But since it's a font issue, I'll have to deal with it myself. Thank you!

Sign In or Register to comment.