Skip to first unread message

Ali Bahrami

unread,
Dec 21, 2015, 4:14:44 PM12/21/15
to HaxeFlixel
is there any support for RTL?
There is a pain for converting packs of texts to images and then putting in the app. Plus, the quality drops.
How can I add RTL Texts in the app?
thanks.

Jeru Sanders

unread,
Dec 21, 2015, 5:46:19 PM12/21/15
to haxef...@googlegroups.com
flixel.text.FlxText uses openfl.text.TextField directly, so right to left should be supported if you're using a font that defines it.

Ashiq A.

unread,
Dec 21, 2015, 11:42:27 PM12/21/15
to haxef...@googlegroups.com
Is there a setting for RTL? I didn't see a property or method to specify RTL. The letters appear disconnected and left-to-right instead of connected and RTL. (I tried with a Unicode Arabic font.) 

--
HaxeFlixel Development Community
See our github https://github.com/haxeflixel/ and our documentation http://haxeflixel.com/documentation/
---
You received this message because you are subscribed to the Google Groups "HaxeFlixel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haxeflixel+...@googlegroups.com.
Visit this group at https://groups.google.com/group/haxeflixel.
To view this discussion on the web visit https://groups.google.com/d/msgid/haxeflixel/c8439a66-29e9-4580-84c9-bf2d259be525%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Jeru Sanders

unread,
Dec 22, 2015, 4:39:32 PM12/22/15
to HaxeFlixel
I'm not very familiar with right to left fonts, they may have to be done at the lime level as I'm seeing here, although I would ask at the openfl forum to be sure.

Ashiq A.

unread,
Dec 22, 2015, 8:39:58 PM12/22/15
to haxef...@googlegroups.com
I get a crash when I run that sample. I opened an issue on community.openfl.org

Anyway, I can reproduce this error (in HaxeFlixel) with a very simple app; at the same time, try.haxe.org does output the letters correctly, so I think there might be room for improvement in one of the middle layers. I'll update this thread once I have something significant to report.

Jeru Sanders

unread,
Dec 23, 2015, 2:44:14 PM12/23/15
to HaxeFlixel
Can you post an example of the crashing code so I can test it?

Ashiq A.

unread,
Dec 23, 2015, 3:37:21 PM12/23/15
to haxef...@googlegroups.com
Certainly. I've pushed an example here, which is a very slight modification of the FlxTextFormat example: https://github.com/ashes999/haxeflixel-rtl

Let me know if you need anything else. If you open PlayState.hx in gedit, you'll see how the connected text is supposed to appear. Let me know if you need a better example or more details.

--Ashiq


Ashiq A.

unread,
Dec 23, 2015, 3:44:34 PM12/23/15
to haxef...@googlegroups.com
I've also pushed a corresponding OpenFL example using the AddingText sample (generated). It looks identical to the HaxeFlixel one. I'll make a reference to it in my community.openfl.org post.

--Ashiq

Jeru Sanders

unread,
Dec 24, 2015, 2:33:10 AM12/24/15
to HaxeFlixel
This is what I get when I compile both, although I am using the dev version of HaxeFlixel.

Ali Bahrami

unread,
Dec 24, 2015, 4:51:17 AM12/24/15
to HaxeFlixel
the right version is this. I mean the style, not the font and colors.
Thanks to you Jeru and Ashiq for paying attention to this.

Jeru Sanders

unread,
Dec 24, 2015, 7:42:51 PM12/24/15
to HaxeFlixel
Yeah, as I look this up more it doesn't seem possible to make this happen outside of the Flash target. There might be a separate library that could make this happen, although I'd bet embedding the images would be easier. Although if your game relies super heavily on text then you might consider some kind of macro system to generate your font images.

Ashiq A.

unread,
Dec 24, 2015, 9:17:55 PM12/24/15
to haxef...@googlegroups.com
So it's possible to make this happen within the Flash target? How?

I tried both using system and embedded fonts, without success.

Jeru Sanders

unread,
Dec 25, 2015, 12:28:31 AM12/25/15
to HaxeFlixel
You can do it by embedding a Flash Player runtime header SWC thing.
Then you should be able to "import fl.text.TLFTextField"(docs) and use that, which supports all kinds of crazy text layouts.

Although to be noted that's getting pretty far from my realm of knowledge, I've never actually done any of that before and honestly would create a system for generating images before this.
Reply all
Reply to author
Forward
0 new messages