conjunct consonants in hindi is not properly displayed.
# -*- coding: utf-8 -*-
from direct.showbase.ShowBase import ShowBase
from direct.gui.DirectGui import DirectLabel
from panda3d.core import *
import panda3d
panda3d.core.load_prc_file_data('', 'text-encoding utf8')
class HindiTextApp(ShowBase):
def __init__(self):
ShowBase.__init__(self)
# Load a Devanagari font (Make sure the font file is in your project directory)
hindi_font = loader.loadFont("NotoSansDevanagari-Regular.ttf") # Or any other Devanagari font
# Create a DirectLabel with Hindi text
self.label = DirectLabel(
text="मैं किसी का हिंदी में अभिवादन कैसे करूं?",
text_font=hindi_font,
scale=0.13,
text_fg=(0, 1, 0, 1), # Green text
frameColor=(0, 0, 0, 0), # Transparent background
pos=(0, 0, 0)
)
#print(cpMgr)
#print(ConfigVariableString('text-encoding'))
app = HindiTextApp()
app.run()
NotoSansDevanagari-Regular.ttf (215.9 KB)