I'm using PyGame to draw some Hindi and other languages used in India or Malayalam (etc. ថ្ងៃ
). I checked websites like Twitter which supports multiple languages, uses the Leelawadee UI
font to display text, so I added it to the script but got blank space like this.
#!/usr/bin/python
import pygame
pygame.init()
font_size = 1024
font = pygame.font.SysFont('LeelawUI', font_size)
text = font.render(text, True, (27, 149, 224), background)
pygame.image.save(text, output_path)
I've tried another font and got a different space box like this
Also, ts there a library that can handle the mis-marked stress or vowels in this language? When I type-in word like കേരളബ്ലാസ്റ്റേഴ്സ്
, it seems the program doesn't understand correctly that this is a word and not a discrete letter.
Thanks in advance.