BaH.RTL is now available for consumption - from the maxmods SVN repository.
I've tested it on Mac and Windows so far. (Linux next).
It uses the libfribidi library, which is LGPL, so I've shipped the appropriate .dylib/.dll file also. (I also had to create a makefile for Windows, so I've shipped the source too, if you ever feel the need to recompile the dll). LGPL means you can use the library in ANY app, free or otherwise.
Anyhoo, the API is possibly one of the easiest to use... there's ONE function, which takes a String, and returns another...
The returned string should be correctly formatted for displaying with DrawText, for example.
There's one example app provided, which renders the same text as in the image above.
You will need to copy the library (.dll / .dylib) from the lib folder into application folder. (For Mac, this is INSIDE the application bundle, in the same folder as the app binary, as usual).
Coincidentally, I believe this is the same formatter which Pango uses on Linux...
And yes, I know this is possibly about as niche as my modules get, but you never know... perhaps someone will find it useful !
As usual, comments and suggestions are always welcome.
:o)
Enjoy!
I've tested it on Mac and Windows so far. (Linux next).
It uses the libfribidi library, which is LGPL, so I've shipped the appropriate .dylib/.dll file also. (I also had to create a makefile for Windows, so I've shipped the source too, if you ever feel the need to recompile the dll). LGPL means you can use the library in ANY app, free or otherwise.
Anyhoo, the API is possibly one of the easiest to use... there's ONE function, which takes a String, and returns another...
Function FormatStringRTL:String(text:String)
The returned string should be correctly formatted for displaying with DrawText, for example.
There's one example app provided, which renders the same text as in the image above.
You will need to copy the library (.dll / .dylib) from the lib folder into application folder. (For Mac, this is INSIDE the application bundle, in the same folder as the app binary, as usual).
Coincidentally, I believe this is the same formatter which Pango uses on Linux...
And yes, I know this is possibly about as niche as my modules get, but you never know... perhaps someone will find it useful !
As usual, comments and suggestions are always welcome.
:o)
Enjoy!