[Dot] Right to left languages - wrong letter order
Ported Issue from Mantis Original ID: 867 Reported By: Andrew Schetinin
SEVERITY: MINOR Submitted: 2005-04-10 13:04:32
OS: --*
VERSION: 2.2.1
DESCRIPTION
Hi,
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.
ADDITIONAL INFORMATION
[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 (http://www.pango.org/) for text layout, but this will take some development effort. Pango is portable to Win32.