Hi Yousef, I talked about that with Campbell, and we got to some roadmap that should be a good start for someone willing to tackle the problem:
(1) handle the drawing: 1.1.Implement bi-di (bi-directional support) in blf (Blender internal truetype2 wrapper+utility functions). 1.2.Implement complex scripting (the arabic replacement to the presentation form of the chars). This could be done by static linking an external library (e.g. ~pango). Or refactoring the blf to support this internally (unlikely to happen). If opting for an external lib complex-scripting should come "for free". (2) handle the editing: 2.1. that includes cursor positioning, backspace, copy/paste It may be a good idea to use part of 1.1. implementation for that. This should be simpler than (1). But without the drawing correct, it doesn't make sense to handle editing. Thus it comes after. I added those info here - http://wiki.blender.org/index.php/User:Dfelinto#UTF8_and_complex-scripting * Note to have text3d working for a 3d package you can write the text in the Text Editor, use the script in python to convert the text, and use the "Edit->Text to 3D Object". <<and fix the text to 3d object to work with utf8, it shouldn't be hard>> <<or use bpy.context.object.data.body=text_in_utf8>> * Note 2: a python addon exclusively for the text3d could work for you as well. Have you considered it? Let me know what you think. If someone is interested on tackling that we can put branch up and running. Cheers, Dalai 2011/10/24 Yousef Hurfoush <[email protected]> > > Hi dalai > > i know the fork i proposed is NOT the way it should be, i think going > the further mile is the best approach, but that WILL take a big amount of > time and commitment to revamp the text drawing aligorithm in blender. > > So, i think doing a simple procedure of implementing the arabic_to_utf > operator > is best for more internationalization as currently there are no 3D package > provide > RTL languages in the text object. > > Another approach i found is using special font's with replaced char map > with the language > you want to implement, which what i use now, but we still need to reverse > the order. > > here is a sample of the word "yousef" -> 'يوسف' : > http://www.pasteall.org/pic/19489 > > > > I would take a look at some library that we can used with freetype2 (our > > current text drawing low-level library). To re-create the wheels > ourselves > > seems a bit overkill to me. > > > > This text has a good overview, Panda caught my eyes there: > > http://behdad.org/text/ > > > > There is more to complex scripting than replacing the arabic letters by > > their presentation form. This is needed, but should happen under the hood > at > > drawing time only imho. > > > > That said, given that ui drawing is likely the most daily demanding usage > of > > text, I think "pre-baked" .po is still a great idea (I'm trying to > improve > > the py script btw) > > > _______________________________________________ > Bf-committers mailing list > [email protected] > http://lists.blender.org/mailman/listinfo/bf-committers > _______________________________________________ Bf-committers mailing list [email protected] http://lists.blender.org/mailman/listinfo/bf-committers
