[Bf-committers] Arabic support in text editing
dfelinto at gmail.com
Mon Oct 24 21:43:39 CEST 2011
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 -
* 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
* 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.
2011/10/24 Yousef Hurfoush <bat3a at msn.com>
> 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
> is best for more internationalization as currently there are no 3D package
> 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" -> 'يوسف' :
> > 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
> > 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
> > drawing time only imho.
> > That said, given that ui drawing is likely the most daily demanding usage
> > text, I think "pre-baked" .po is still a great idea (I'm trying to
> > the py script btw)
> Bf-committers mailing list
> Bf-committers at blender.org
More information about the Bf-committers