GNOME Bugzilla – Bug 338295
Arabic characters are not displayed correctly when printing tasks
Last modified: 2013-09-13 12:25:36 UTC
Please describe the problem: Currently, evolution doesn't use pango for text handling when printing tasks. So printing e-cell-text doesn't support RTL language. Steps to reproduce: 1. login in Arabic locale 2. invoke Evolution 3. create a task with arabic characters 4. print preview above task Actual results: Arabic text is RTL language but is showed in left-to-right order. Expected results: Arabic text is printed in right-to-left order. Does this happen every time? Yes. Other information:
Created attachment 63355 [details] screenshot
Created attachment 66402 [details] [review] sun_patches I made several changes in e-cell-text.c, listed bellow: 1. Height of some special font is much higher than others, such as Arabic. So leave some more margin for cell: replace "16+4" by "16+8"; 2. Replace "height" by "text_height" which is the actual height of the string to display when drawing text, under line, strike- through line. 3. For some right-to-left text, the horizontal position to draw under line or strikethrough line is extremely different from the left-to-right text. So I use PangoDirection to determine whether it is a right-to-left text or not.
Nancy, the g_assert introduced troubles me a bit - can this be tackled by raising an error instead ? We have been focusing on weeding out asserts for some time which are spread all over the code. The patch otherwise looks fine. Thanks.
Created attachment 66760 [details] [review] sun_patches replace g_assert by return.
Harish, Nancy change a bit according to your suggestion. Please review again, thanks.
Committed the patch to CVS HEAD and gnome-2-14 branch. Thanks.