The Free Implementation of the Unicode Bidirectional Algorithm.
Copy the tea one-liner above into your terminal to install fribidi. tea will interpret the documentation and take care of any dependencies.