Login  Register

Re: TextRenderer problem with Arabic

Posted by void-pointer on Apr 25, 2011; 6:03am
URL: https://forum.jogamp.org/TextRenderer-problem-with-Arabic-tp905919p2860204.html

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.