[SOLVED] Arabic Language Supporting for JME

After a lot of searching for a library or a technique to write arabic UI text in JME I didn’t find anything that help especially for writing the connected litters. So, I tried to implement that using the TTF fonts and I Succeeded with that :smile: .

What I have done in the final is to render the text to a com.jme3.ui.Picture, but I use Nifty always to design the UI interfaces. So, I have to implement a lot of classes such as NiftyJmeDisplay.java, RenderDeviceJme.java, RenderFontJme.java and I have to implement them from the zero just to add the ability to use TTF fonts for nifty!
For the new BatchRenderDevice I even don’t know from where to go.
I hope you have any advice guys for this.

3 Likes

Have you tried JavaFX 11 for jME?

1 Like

No. I see that Nifty is better in game UI than JavaFX at least for me. Is JavaFX more powerful than Nifty in game UI?

It’s like saying is linux better than windows. Sometimes. Depends what you want. I think he mentioned it in particular because it uses regular TTF fonts so would require literally zero work to use non-english characters.

1 Like

You are right. Anyway, Nifty have some good features like the popups and repeating backgrounds with that particular way that save the corners from repeating and many more which will save time and effort :sweat_smile:.

Ok guys. I have implemented it for Nifty and it’s ready to use :slight_smile:

3 Likes

but I had made a tool to create bitmap fonts and using RTL languages like Persian and Arabic two years ago.

2 Likes

Two common ways to look at this kind of thing:

  • We should team up and build on/improve what’s already out there.
  • The more options out there the better! (and there’s nothing stopping some level of collaboration on parallel efforts, anyway)

Pros and cons for both, so no harm done. As long as licenses are compatible of course…

1 Like

1-did you changed something in nifty gui lib too?
2-how is it working and how can I change it to work in lemur gui lib?
3- how about showing a mix of numbers and letters in ar and eng language, is it working correctly?
I mean something like this:

1 Like

Of course I tried your library (I really appreciate your effort on that :slightly_smiling_face:) but it didn’t work for me. The letters were not connected evenif there is the connected form of letters in the bitmap image. At that moment I though that the problem was in the bitmap fonts method in viewing the letters as I read that many times in this hub. So, I didn’t contribute that to your lib beacause it’s rendering the letters and showing them in a different way (my library doesn’t create a bitmap font but it render the letters from a TTF fonts at the runtime).

1 Like

and how did you use it in nifty gui?

it works correctly for me, image
did you see Arabic glyphs in the image file and the letters were not connected in gui controls?

1 Like

1-No. I edited the Jme implementation for Nifty.
2-It renders the text from AWT Font and print it on a com.jme3.ui.Picture. So, I think (I didn’t test this) it will work fine when using Lemur (what is really should be implemented is the android support because I don’t think the AWT API is offered in the android jvm :sweat_smile:).
3-I didn’t test that :grin: but it should work in the same way as AWT rendered text.

1 Like

Yes. Even that it didn’t work for me. I rendered the arial font in your lib then used it in the code and that what happened. I will give it another try these days.

I implemented the jme nifty imaplementation another time to add the support for that :sweat_smile:

1 Like