Soamp Posted March 3, 2010 Share Posted March 3, 2010 in fact I want to implement right to left language, according to thispage my fonts converted using fontstudio, and I could load them correctly, but I don't access to characters between 0600 to 06ff as unicode characters in LUA. eg. by using this line: DrawText("\1586",200,200) it will write "06" which is wrong character. any suggestions please? Quote Link to comment Share on other sites More sharing options...
Canardia Posted March 3, 2010 Share Posted March 3, 2010 You need to define a cross-reference table which associates unicode characters (value > 255) with ASCII characters. I've done that already for C++, and I could also add Lua version. Note that the arabic text is a right-to-left font and writing (it even reverses the cursor left and right keys in VS): http://leadwerks.com/werkspace/index.php?/topic/1338-make-cyrrilic-font-in-le-solved/page__view__findpost__p__12508 Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Soamp Posted March 3, 2010 Author Share Posted March 3, 2010 I will check it, thanks.. Quote Link to comment Share on other sites More sharing options...
Soamp Posted March 3, 2010 Author Share Posted March 3, 2010 well.. I checked that, but I could not get correct result. I currently have unicode string for my character, just don't know how to define this strings as a unicode. for example in python you can use this syntax to define a unicode: U"65248" do you know how can I define this in LUA? Quote Link to comment Share on other sites More sharing options...
Canardia Posted March 3, 2010 Share Posted March 3, 2010 You shouldn't need to define any codes, but just write the text as it is. You can write unicode russian, arabic, hebrew, etc... Then you just give your string as a parameter to a function like str16to8() and it will convert it to ascii characters which are matching the Font Studio dds file. When I wrote the arabic text, I had no idea or need to know what codes they actually are, I just wrote the text in english and used google translator to translate it to arabic. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.