TextRenderer problem with Arabic

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

TextRenderer problem with Arabic

PaulD
Hi,

I've noticed that the TextRenderer in JOGL 1.1.1 (and presumably also in the latest version) display Arabic words in the wrong order. The letters within each word are correct, but the words themselves are in reverse order.

I've solved this by setting DISABLE_GLYPH_CACHE to true in the TextRenderer class, but I wonder if anyone has a better solution!

Cheers,

Paul.
Reply | Threaded
Open this post in threaded view
|

Re: TextRenderer problem with Arabic

Michael Bien
Hello Paul,

looks like a bug. Could you file the bugreport or even provide a testcase? JUnit if possible.

would be great...

regards,
michael

On 06/18/2010 06:35 PM, PaulD [via jogamp] wrote:
Hi,

I've noticed that the TextRenderer in JOGL 1.1.1 (and presumably also in the latest version) display Arabic words in the wrong order. The letters within each word are correct, but the words themselves are in reverse order.

I've solved this by setting DISABLE_GLYPH_CACHE to true in the TextRenderer class, but I wonder if anyone has a better solution!

Cheers,

Paul.


View message @ http://jogamp.762907.n3.nabble.com/TextRenderer-problem-with-Arabic-tp905919p905919.html
To start a new topic under jogamp, email [hidden email]
To unsubscribe from jogamp, click here.

Reply | Threaded
Open this post in threaded view
|

Re: TextRenderer problem with Arabic

linnuxxy
how did you set DISABLE_GLYPH_CACHE to true? changed the code or what?
Reply | Threaded
Open this post in threaded view
|

Re: TextRenderer problem with Arabic

void-pointer
I didn't use the TextRenderer class before so I'm hazarding a guess that DISABLE_GLYPH_CACHE is a private constant member. In this case you could obtain an instance of the field using Class.getDeclaredField() and then making it accessible using the AccessibleObject.setAccessible() method which is inherited by Field. At this point you are free to modify its value using the Field.setBoolean() method (I'm guessing that DISABLE_GLYPH_CACHE is a boolean -- if not, it's one of the Field.setX methods) as permitted by the SecurityManager, but your code now relies on undocumented features which may be changed at a later point in time; be sure to catch the appropriate exceptions and print out some useful output so that you won't have to waste time if the code in TextRenderer.class is changed so that this no longer works.
Reply | Threaded
Open this post in threaded view
|

Re: TextRenderer problem with Arabic

linnuxxy
I've made a new class with same code and changed the private field , and made the class as subclass of TextRenderer ... it worked for me