• Khaled Hosny's avatar
    Fix finding Arabic Presentation Forms ligatures · d8f418d2
    Khaled Hosny authored
    PDF text containing Arabic Presentation forms ligatures is still not
    found after the previous commit.
    This because the ligatures are decomposed in logical order after
    normalisation, while the whole string is in visual order.  For example
    the RTL text ABCD in visual order will be DCBA, and assuming B is a
    ligature, it will be decomposed to B1B2 so the string after
    normalization will be DCB1B2A while we are expecting it to be DCB2B1A.
    This patch reverses the order of the decomposition of RTL characters to
    work around this issue.