# -*- 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 <dili...@gmail.com>
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.
**********************************************************************************************

Reply via email to