Hebrew Flipped Text

From Scribus Wiki
Revision as of 15:50, 23 November 2013 by Kunda (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Source: http://lists.scribus.net/pipermail/scribus/2013-November/049582.html

Warning Warning: This is an experimental option submitted by the Scribus community. It works to a degree.

Issue

The general problem is that when you flip the Hebrew (with the flipped "R" in the options of the text box) it also flips the text itself into a mirror-text. So I used the following script to do both: flip the text and have it straight and not "mirrored".

Enclosed is the script, for anybody who would like to use it. It still have the problem with paranthesis, brackets and numbers, but this is a start. I hope to have time to do more, when I would - I'll post what I'll do.

Script

from scribus import *
if haveDoc():
    nbrSelected = selectionCount()
    objList = []
    for i in range(nbrSelected):
        objList.append(getSelectedObject(i))
    for i in range(nbrSelected):
        try:
            obj = objList[i]
            setProperty(obj, "m_ImageIsFlippedH", True)
            setProperty(obj, "reversed", True)
            moveObject(1, 0, obj)
            moveObject(-1, 0, obj)
            docChanged(1)
            setRedraw(True)
        except:
            nothing = "nothing"