[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame]



Dear Bart,

Thank you for your response. I realized that the problem is actually in the font rendering in pygame cause of the way our language uses its symbols. I decided to convert all unicode into standard font mapping and it has worked very well. ÂÂ

On Mon, Sep 22, 2014 at 6:38 PM, Bartosz Debski <bartosz@xxxxxxxxxxxx> wrote:
Hi Diliup,

I'm using unicode without problem in Polish, German and French. Usually it's the font you are using is the problem. I would check those font you selected have correct mappings for characters you want to use.

Try to load this font into your system and check in eg. OpenOffice or Gimp does programs render those characters. If they don't then 100% your font has not those characters mapped.

Cheers
Bart

On Sun, Sep 21, 2014 at 8:36 PM, diliup gabadamudalige <diliupg@xxxxxxxxx> wrote:

# -*- coding: utf-8 -*-
import pygame, sysÂ


pygame.font.init()

screen = pygame.display.set_mode((640,480))

unistring = u"ààà ààààà "

fnt = pygame.font.Font("kaputaunicode.ttf",40)

while True:
  screen.blit(fnt.render(unistring,True,(255,255,255)),(0,0))

  pygame.display.flip()  Â
  for key in pygame.event.get():
    if key.type == pygame.QUIT:
      pygame.quit()
      sys.exit()

this code works but it prints the the second character after the fourth. Any ideas why it's doing that?

On Sun, Sep 21, 2014 at 11:49 PM, diliup gabadamudalige <diliupg@xxxxxxxxx> wrote:
hi!

ANybody has used unicode with pygame? I need help displaying my native text using unicode.

--
Diliup Gabadamudalige

http://www.diliupg.com
http://soft.diliupg.com/

**********************************************************************************************
This e-mail is confidential. It may also be legally privileged. If you are not the intended recipient or have received it in error, please delete it and all copies from your system and notify the sender immediately by return e-mail. Any unauthorized reading, reproducing, printing or further dissemination of this e-mail or its contents is strictly prohibited and may be unlawful. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. The sender does not accept liability for any errors or omissions.
**********************************************************************************************




--
Diliup Gabadamudalige

http://www.diliupg.com
http://soft.diliupg.com/

**********************************************************************************************
This e-mail is confidential. It may also be legally privileged. If you are not the intended recipient or have received it in error, please delete it and all copies from your system and notify the sender immediately by return e-mail. Any unauthorized reading, reproducing, printing or further dissemination of this e-mail or its contents is strictly prohibited and may be unlawful. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. The sender does not accept liability for any errors or omissions.
**********************************************************************************************





--
Diliup Gabadamudalige

http://www.diliupg.com
http://soft.diliupg.com/

**********************************************************************************************
This e-mail is confidential. It may also be legally privileged. If you are not the intended recipient or have received it in error, please delete it and all copies from your system and notify the sender immediately by return e-mail. Any unauthorized reading, reproducing, printing or further dissemination of this e-mail or its contents is strictly prohibited and may be unlawful. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. The sender does not accept liability for any errors or omissions.
**********************************************************************************************