How do I render an Arabic character in OpenGL?

I can display the Chinese character correctly, but when I try to display the Arabic string, the output displayed in the OpenGL scene is different from the Arabic string displayed in the Visual Studio editor. I know this must be related to "Complex Script", but I cannot find a good example in this question. I would like to know how to display Arabic text correctly?

+2


source to share


1 answer


Unlike Latin characters, each of which has a single visual representation, each Arabic character can have many different phenomena depending on the surrounding characters. The logical characters in the Arabic string must be converted to a sequence of visual glyphs so that they can be displayed correctly. OpenGL does not do this processing for you, so you see the displayed logical symbols without this processing.



To get around this, you would need to use a library like Uniscribe to convert the boolean string to a visual string, which you then pass to OpenGL for rendering. There are several examples here .

+5


source







All Articles