[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
Sun Jul 18 17:25:06 UTC 2021


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

--- Comment #69 from Kevin Suo <suokunlong at 126.com> ---
(In reply to Armin Le Grand from comment #67)

No, the concatenation will only be applied to TextElements, and only apply if
the following conditions are met:

1. The current char and next char use the same font, or the next char is a
space char. Same font means the same font family, *font size*,
bold/italic/outline feature etc. AND
2. The current and next chars use the same font color. AND
3. The current char and next char has the same transformation, or the next char
is a blank char.

See code below:

'''
    if( (isSpaces(pNext) || pCur->FontId == pNext->FontId) &&
        rCurGC.FillColor.Red == rNextGC.FillColor.Red &&
        rCurGC.FillColor.Green == rNextGC.FillColor.Green &&
        rCurGC.FillColor.Blue == rNextGC.FillColor.Blue &&
        rCurGC.FillColor.Alpha == rNextGC.FillColor.Alpha &&
        ( isSpaces(pNext) ||
          canConcatenate(rCurGC.Transformation, rNextGC.Transformation,
fAlreadyExpandedDistance)
        )
'''

In this regard, there actually no need to detect if the height of the two chars
are the same. There is also no need to detect if the next object is an image or
something else. The only issue here is the transformation. The transformation
of font in my opinion may be something like rotation.

-- 
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/20210718/196d5dad/attachment.htm>


More information about the Libreoffice-bugs mailing list