Notes on the BiDi-Enabled Version
* What is BiDi?
* Basic Usage
* Preferences
* Troubleshooting
What is BiDi?
BiDi stands for bi-directional, and it refers to the ability of an application to handle both
text that is written from the left-to-right (LTR) and right-to-left (RTL). While handling unidirectional text (only
LTR or only RTL) is straight forward, mixing the two is non-trivial. AbiWord uses the excellent FriBidi
library to do the layout calculations, which in turn implements the Unicode bi-directional Algorithm.
Basic Usage
Much of what is related to the bidi processing in AW is done automatically behind the scenes, and so there is
only little you need to learn above the standard AW procedures.
Choosing the direction of your paragraph
The layout of bidi text depends not only on the sequence of characters, but also on whether the paragraph is considered
predominantly LTR (i.e, it contains LTR text with embeded RTL segments) or whether it is perdominantly RTL (i.e.,
it contains RTL text with embeded LTR segments). In AbiWord we do not use any heuristic methods to determine this,
and you are expected to supply this information explicitly. You should use the
button on the toolbar to do
this (or alternatively, you can use the Format->Paragraph dialog).
Direction of text
The direction of text is worked out automatically as you type using the Unicode algorithm. This means that in 99%
of cases, you should not need to interfere with the layout of the text in any other way than setting the direction
of the paragraph as described in the previous section. Sometimes, however, you may want to get a different layout
than the Unicode algorithm leads to. In this case you can use one of the two toolbar buttons
to force LTR or RTL ordering on a particular portion of the text.
Note: if the automatic ordering of text does not seem to work at all, please see the troubleshooting
section.
Preferences
There are several extra preferences to customise the bidi-enabled version of AbiWord, found on the Preferences
Schemes tab of the preferences dialog. They are:
Default to right-to-left direction of text
If you are composing mainly RTL documents, check this option. This will change some of the default values, for
instance paragraphs will be set to RTL unless you specify otherwise.
Determine correct glyph shapes from context
AbiWord is capable of doing basic glyph shaping for languages like Hebrew and Arabic. If you want the glyphs to
change to fit their context, turn this on (you need this for Arabic, and may or may not want it for Hebrew).
Save visual glyph shapes
This option is only available if the Determine correct glyph shapes from context is turned on. Normally
AbiWord saves the character codes you typed in, not the codes of the glyphs as they appear on the screen. In some
circumstances you may want to actually save the glyphs you see, in which case you should check this option (NB:
this option needs to be used with caution if you intend to pass your documents onto someone else).
Troubleshooting
This section refers to common problems with the bidi functionality.
Linux
- The Hebrew/Arabic characters do not get automatically ordered correctly, I have to use the override buttons
all the time: this is almost certainly caused by your locale and keyboard not being setup correctly. Please
see the NonEnglishUnixKeyboard.abw document in the docs subdirectory of the AbiWord source tree.
|