Number: 681
Title: Right to left languages - wrong letter order
Submitter: Andrew Schetinin
Date: Sun Apr 10 08:04:32 2005
Subsys: Dot
Version: 2.2.1
System: *-*-*
Severity: minor

We need to make dot working with Arabic/Hebrew graphs. When trying to generate PNG output file from an input UTF-8 file, we found that the letter order was opposite (left-to-right instead of right-to-left). I've tried to change the letter order manually, expecting that the result will look as right-to-left word, but still there is a problem: in Arabic letters in the word must be connected to each other, and in the output file they look separate.

I did not find any information about graphviz and right-to-left scripts in Web.

As far as I know, Windows knows to output right-to-left strings correctly. The regular TextOut function knows to connect letters to each other. It looks like GraphViz does not use TextOut, or uses it for each letter separately, printing letters one by one.

Does somebody have any experience with right-to-left scripts?

Notes regarding the attached input/output files: first word is in Arabic visual order (manually changed, to make it look as right-to-left on screen), second word is in Arabic logical order (normal in-memory order, but looks incorrectly on screen - like left-to-right), third and fourth words are sequences of Russian letters, only for Unicode testing.

Thank you in advance.
Input file:
Output file: b681.png
[ellson] This is an area of internationalization that I knew we didn't support at the moment. Also vertical text, like Chinese.

My plan is to use pango ( for text layout, but this will take some development effort. Pango is portable to Win32.
Owner: *
Status: *