Howdy, Stranger!

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

Supported by

[open] Farsi fonts display

edited April 2013 in OpenSesame

I am using the latest version of OpenSesame. I need to have both the instructions and the word stimuli in Farsi. The Farsi font is selected in the relevant combo box but the outcome is squares instead of letters. In addition, after trying different Arabic fonts, The letters are showed detached but not continues and from the left to right.
Any advice is much appreciated.

Comments

  • edited 6:19PM

    Regarding the showing of squares instead of characters, Lotje's explanation from this discussion should work in principle. Could you be more specific as to what happens exactly? Do you see boxes in the GUI as well, or just during the experiment? What back-end are you using? And are you sure the selected font contains Farsi characters?

    Regarding the direction of writing, OpenSesame does indeed not take into account the correct direction. Please see this discussion for a script-based workaround:

    Cheers!

  • edited 6:19PM

    Thanks !The inline script works well. The direction is corrected now but the fonts are displayed in capital letters. As you may know, in Farsi, like Arabic, the letters are continues and small. Do you think if this could be fixed too?
    Masoud

  • edited April 2013

    Hi Masoud,

    I'm afraid that I cannot offer much help here, as my understanding of non-western alphabets is essentially zero. I can blindly manipulate text strings (such as reversing them), but I have no idea whether the outcome makes sense.

    Edit: This suggests that rendering Arabic fonts with PyGame is inherently problematic. However, they also provide a link to another library, which may be worth checking out.

    Perhaps you could experiment a bit with the PyGame font rendering (which is what is used for the legacy and xpyriment back-ends), to see whether you can get things to display properly this way? If you succeed, you can share your findings here, and I can hopefully use this to improve this aspect of OpenSesame. For example, the script below (assuming the legacy back-end) shows a simple string of text using the PyGame functions directly:

    import pygame
    
    fontSize = 24
    fontColor = 255, 255, 255 # White
    fontAntiAlias = True # Fuzzy edges
    # Get the full path to the font
    fontPath = pygame.font.match_font('Times New Roman')
    
    # Create a font object
    font = pygame.font.Font(fontPath, fontSize)
    
    # Render some text onto a surface
    surf = font.render('Some text', fontAntiAlias, fontColor)
    
    # Paste the surface onto the window (i.e. the screen)
    win.blit(surf, (0,0))
    
    # Update the screen!
    pygame.display.flip()
    

    See also

    Cheers,
    Sebastiaan

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games