[Libreoffice-bugs] [Bug 104597] Text runs of RTL scripts (e.g. Arabic, Hebrew, Persian) from imported PDF are reversed, PDFIProcessor::mirrorString not behaving

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Jul 16 04:59:07 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=104597

--- Comment #53 from Kevin Suo <suokunlong at 126.com> ---
Created attachment 173616
  --> https://bugs.documentfoundation.org/attachment.cgi?id=173616&action=edit
tdf104597-not-perfect-patch.diff

Good news is that we are almost there.

With the attached modification to the code, the RTL text are now shown in
correct order.

However, the modification has deleted the "(rCurGC.Transformation ==
rNextGC.Transformation || notTransformed(rNextGC))" condition directly. This
may be wrong. Need to find a special case when some text within a line has
transformation even though the characters in this line all have the same font
id and the same fill color. This may be very rare. I tested many PDFs with this
patch applied on current master, all of them are displaying perfect.

As a result, the attached may be committed to master in my opinion, because
this makes Draw to be usable for RTL pdf files. In case someone find a special
case when the removable of transformation may have caused a regression, then we
investigate that matter separately.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210716/086d866d/attachment.htm>


More information about the Libreoffice-bugs mailing list