Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RTL text support and fa locale #2297

Closed
wants to merge 5 commits into from
Closed

Add RTL text support and fa locale #2297

wants to merge 5 commits into from

Conversation

masoudbh3
Copy link
Contributor

Add RTL text support for all section of godot engine.
for use rtl text in godot engine import a font that contains arabic
glyphs and use that for editor font or gui font. (godot default fonts
not contains arabic glyphs)

Before :
RTL_Before
After :
RTL_After

and add fa (persian) locale.

Add FA (Persian) Locale
Add RTL text support for all section of godot engine.
for use rtl text in godot engine import a font that contains arabic
glyphs and use that for editor font or gui font. (godot default fonts
not contains arabic glyphs)
@punto-
Copy link
Contributor

punto- commented Jul 23, 2015

the 'fribdi' library seems to be LGPL, unless I'm missing a second license?
also it should go on drivers/

On Thu, Jul 23, 2015 at 8:55 AM, masoud bh notifications@github.com wrote:

Add RTL text support for all section of godot engine.
for use rtl text in godot engine import a font that contains arabic
glyphs and use that for editor font or gui font. (godot default fonts
not contains arabic glyphs)

Before :
[image: RTL_Before]
https://cloud.githubusercontent.com/assets/9015847/8849636/7b0b9f5c-3156-11e5-8ad8-5aa69199ddd4.png
After :
[image: RTL_After]
https://cloud.githubusercontent.com/assets/9015847/8849637/7b44c7c8-3156-11e5-9ffe-5a2694161f42.png

and add fa (persian) locale.

You can view, comment on, or merge this pull request online at:

#2297
Commit Summary

  • Add FA Locale
  • Add RTL Text Support

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#2297.

@reduz
Copy link
Member

reduz commented Jul 23, 2015

yeah, fribidi is awesome, but lgpl license makes it impossible for use on
mobile devices or consoles. Is the algorithm used by fribidi that complex?
Maybe the functions themselves could be isolated

On Thu, Jul 23, 2015 at 9:01 AM, punto- notifications@github.com wrote:

the 'fribdi' library seems to be LGPL, unless I'm missing a second license?
also it should go on drivers/

On Thu, Jul 23, 2015 at 8:55 AM, masoud bh notifications@github.com
wrote:

Add RTL text support for all section of godot engine.
for use rtl text in godot engine import a font that contains arabic
glyphs and use that for editor font or gui font. (godot default fonts
not contains arabic glyphs)

Before :
[image: RTL_Before]
<
https://cloud.githubusercontent.com/assets/9015847/8849636/7b0b9f5c-3156-11e5-8ad8-5aa69199ddd4.png

After :
[image: RTL_After]
<
https://cloud.githubusercontent.com/assets/9015847/8849637/7b44c7c8-3156-11e5-9ffe-5a2694161f42.png

and add fa (persian) locale.

You can view, comment on, or merge this pull request online at:

#2297
Commit Summary

  • Add FA Locale
  • Add RTL Text Support

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#2297.


Reply to this email directly or view it on GitHub
#2297 (comment).

@godotengine
Copy link
Collaborator

this is a very good patch though, are you sure you can't get the
functionality for bidi_visual_string from somewhere else?

On Thu, Jul 23, 2015 at 9:15 AM, Juan Linietsky notifications@github.com
wrote:

yeah, fribidi is awesome, but lgpl license makes it impossible for use on
mobile devices or consoles. Is the algorithm used by fribidi that complex?
Maybe the functions themselves could be isolated

On Thu, Jul 23, 2015 at 9:01 AM, punto- notifications@github.com wrote:

the 'fribdi' library seems to be LGPL, unless I'm missing a second
license?
also it should go on drivers/

On Thu, Jul 23, 2015 at 8:55 AM, masoud bh notifications@github.com
wrote:

Add RTL text support for all section of godot engine.
for use rtl text in godot engine import a font that contains arabic
glyphs and use that for editor font or gui font. (godot default fonts
not contains arabic glyphs)

Before :
[image: RTL_Before]
<

https://cloud.githubusercontent.com/assets/9015847/8849636/7b0b9f5c-3156-11e5-8ad8-5aa69199ddd4.png

After :
[image: RTL_After]
<

https://cloud.githubusercontent.com/assets/9015847/8849637/7b44c7c8-3156-11e5-9ffe-5a2694161f42.png

and add fa (persian) locale.

You can view, comment on, or merge this pull request online at:

#2297
Commit Summary

  • Add FA Locale
  • Add RTL Text Support

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#2297.


Reply to this email directly or view it on GitHub
#2297 (comment).


Reply to this email directly or view it on GitHub
#2297 (comment).

OkamStudio

@masoudbh3
Copy link
Contributor Author

I was not very familiar with licenses.
I'll try to implement bidi algorithm.

Create new bidi class and use that in text rendering.
and fix some bugs.
@masoudbh3
Copy link
Contributor Author

bidi changed , what's your opinion.

@mohaalak
Copy link

mohaalak commented Aug 2, 2015

I wrote RTL support with firbidi some time ago , but I think this bidi is awesome , @masoudbh did you implement earab too? I write it in persian so you know what I mean.
سلام آقا شما کسره فتحه تشدید و اینارو گذاشتی چون من دارم کار میکنم رو این قسمتش از رو کد که به نظرم نزدی درسته؟

fixe earab (fatha,kasra,shada,...) positions and nsm type in start of
paragraph problem.
add some comment for license.
@masoudbh3
Copy link
Contributor Author

this bidi class derived from fribidi library code with some bug fixes. this class is a demo.
soon we together implement bidi algorithm from unicode site: http://unicode.org/reports/tr9/ and change this class from base.
this class is only an interface.
you still can't compile this class statically in commerical games.
this class support earab (fatha,kasra,shada,...).

@mohaalak
Copy link

mohaalak commented Aug 2, 2015 via email

@masoudbh3
Copy link
Contributor Author

no, bidi algorithm is not licensed and provided by "The Unicode Consortium".
there are many implement of bidi algorithm.
fribidi , harfbuzz , python-bidi , ...
LGPL , old MIT , LGPL , ...
godot support earab only with bitmap font and not with distance field font.
bidi_earab
thanks to the efforts of godot engine team for good (very good) implement of font rendering.
but again I say, this class now have license issue for commerical games and can only used for open source games.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants