Forum: Official Open PS2 Loader Forum - Discussion and information on the Official Open PS2 Loader.


The above video goes away if you are a member and logged in, so log in now!




 
Would you like to get all the new info from
PSX-Scene in your email each day?




Want to learn more about the team keeping you up to date with the latest scene news?

Read about them now!

Check out our Developer bios, too!

 


User Tag List

Like Tree1Likes

Thread: Right-to-left writing for OPL (mostly arabic language support)
  

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
  1. #1 Right-to-left writing for OPL 
    hominem.te.esse is offline Babylon User
    Join Date
    Mar 2011
    Posts
    221
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    4
    Likes Received
    24
    Is someone still interested for this ?

    I now have some basic code to test.

    It was a real pain to code this, because we use UTF-8 encoding, thus it requires to read the "strings" from left-to-right, no matter how we will render them later (in utf-8 you have more that one byte to encode one character, and the decoding needs to start from the first one, which is on the left). The problem is when you have to write right-to-left which would require to start reading the "strings" from the right, and then advance to the left ...

    Anyway it is now solved, so if anyone want to test it, speak here !

    I join the arabic language file made by fawzisaeed long ago, that I fixed (I mean, removed useless spaces from beginning and end). It need to be corrected and completed (we have more strings now).

    For example, line 50:

    بدايةخدمة HDL

    Which is for "Start HDL Server", I don't think that the word "HDL" should be at the end of the sentence, probably it should be at the "beginning" as in RTL it goes then at the end ... As I don't read arabic I can't be sure anyway ...

    For the moment the rendering should be fine, but it still requires a shift/transposition to have the text starting from the right of the screen. But that requires also some code changes for the drawing of pictures, so I first want a feedback before starting to finalize the code.

    Also I need to implement wrapping/cliping for RTL text, which is disabled for now.

    EDIT: It seems that it is not only applicable for arabic, but also for many other language:

    Right-To-Left Script Languages
    (Note many languages are also written in other scripts, which may be left-to-right.)

    Arabic: Arabic, Azeri/Azerbaijani1, Bakhtiari, Balochi, Farsi/Persian, Gilaki, Javanese3, Kashmiri, Kazakh3, Kurdish (Sorani), Malay3, Malayalam3, Pashto, Punjabi, Qashqai, Sindhi, Somali2, Sulu, Takestani, Turkmen, Uighur, Western Cham
    Hebrew: Hebrew, Ladino/Judezmo2, Yiddish
    N'ko: Mandekan
    Syriac: Assyrian, Modern Aramaic Koine, Syriac
    Thaana/Thâna: Dhivehi/Maldivian
    Tifinar: Tamashek
    Urdu: Urdu

    So if you are user of one of these languages, and want to give a try, tell me (you'll need to write a custom language file too in that case).
    Attached Files
    Last edited by hominem.te.esse; 01-28-2012 at 02:49 PM.
    amp2006 likes this.
    Reply With Quote  

  2. #2  
    Join Date
    Jul 2011
    Posts
    43
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    اتوقع تصلح
    thats a great idea
    how do i install it
    Reply With Quote  

  3. #3  
    fawzisaeed is offline Member
    Join Date
    Dec 2010
    Posts
    58
    Downloads
    3
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    i hope to trans to arabic language
    but some word examole hdl cant any tarans
    atry to use that file and answer to another time
    thanks
    يدا بيد للتعريب من قبل الجميع
    Reply With Quote  

  4. #4  
    hominem.te.esse is offline Babylon User
    Join Date
    Mar 2011
    Posts
    221
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    4
    Likes Received
    24
    Copy these two files in your OPL folder of your memory card:

    mc?:/OPL/
    lang_Arabic.lng
    font_Arabic.ttf

    Then launch this version of OPL, in display settings, select "Arabic". Then check the rendering if it is correct, then check every translation.

    Correct the lang_Arabic.lgn file if needed, add the missing entries (12 last lines), have a look at the english template:

    https://bitbucket.org/ifcaro/open-ps...ng_English.lng


    NOTE: This is a beta version of OPL, with Right-to-Left scripting compiled by default ! So don't use it for another purpose
    Last edited by hominem.te.esse; 01-30-2012 at 04:05 PM. Reason: removed attachment
    Reply With Quote  

  5. #5  
    fawzisaeed is offline Member
    Join Date
    Dec 2010
    Posts
    58
    Downloads
    3
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    thanks mr hominem.te.esse that file(beta) is good but there are some broblem
    the letter appear seprated for example
    ا ع د ا دات ا ل ب ر ن ا م ج
    والصحيح: اعدادات البرنامج
    example english:
    close program
    appera: c l o s e p r o g r a m
    and there are second prblem
    the word in arabic language appare oppesit for example
    البرنامج اعدادات
    والصحيح اعدادات البرنامج
    example for english
    apparerogram close
    close program
    anderstand me
    i want to learn mean for this apreviation for trans to arabic language ( english to english)
    ID
    HDL
    PSS
    IGR
    cdvdfsv
    VMC
    THANKS FOR YOU
    MR I TRY TO CONVERT TXT TO (UTF-8--UNICODE---UNICODE BIG---ANSI)
    BUT UTF-8 ONLY RIGHT AND ANOTHER DONT WORK
    THANKS
    Reply With Quote  

  6. #6  
    hominem.te.esse is offline Babylon User
    Join Date
    Mar 2011
    Posts
    221
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    4
    Likes Received
    24
    It's hard to understand you fawzisaeed but it's ok you're doing your best.

    Try this new version, it will correct the problem concerning the misplaced words. This was due to space and other punctuation characters being used in Left-to-right and right-to-left scripting. theses characters needed to be treated as "neutral" glyph, and do not change the direction of rendering.

    But about the space between character, this doesn't seems to be a bug. I can't reproduce it, and it should not happen. At least not for the english (latin) strings, for which there is nothing changed technically in rendering mechanism.

    So I guess you didn't used my special font, joined within the archive attachment. Please be sure to use it, and try again.

    Make a screencap (or picture) if the problem persist.


    NOTE: This is a beta version of OPL, with Right-to-Left scripting compiled by default ! So don't use it for another purpose
    Last edited by hominem.te.esse; 02-04-2012 at 05:12 AM.
    Reply With Quote  

  7. #7  
    fawzisaeed is offline Member
    Join Date
    Dec 2010
    Posts
    58
    Downloads
    3
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    i am very sory mr hominem.te.esse but iam poor in english werting
    that file is good but there are one problem seprated chatacter
    ا ع د ا د ا ت
    اعدادات
    plz upload to me font support for ps2
    i use this fonts in my computer and ok no any seprater but when i put to sp2 that seprater is
    i try to rewerite transef again and compleat 12 line but thate has some appreviation not any transef do you help me that appreviation is
    vmc:meaning virtual memory card
    ID:
    HDL:
    PSS:
    syscalls:
    IGR"
    cdvdfsv:

    and there are some word not found in file english https://bitbucket.org/ifcaro/open-ps...ng_English.lng
    v-sync
    ps2smb
    mode1+2+3+4+5+6
    where ifound it?
    help me plz to complate arabic languge file and upload to yuo again
    thanks
    Reply With Quote  

  8. #8  
    hominem.te.esse is offline Babylon User
    Join Date
    Mar 2011
    Posts
    221
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    4
    Likes Received
    24
    Did you tried the font (font_arabic.fnt) present into the OPL_TRL2.zip attachment above ?

    With this one there should not be any "extra" space between character.

    Please someone else double check this too.

    You can also put your own font here in attachment, and I'll have a look at it. Mine don't use "kerning", if yours have some, I'm interested to have it.


    Note: You DON'T have to translate the specific "english" acronym (or to techy words) like: VMC, ID, HDL, PSS, syscalls, IGR. And it is the same for the other you mentioned, which are even not present in the language files (no internationalization support at all for those): cdvdfsv, vsync, ps2smb, mode1+2+3+4+5+6, ...


    Now concerning other language, is there no-one willing to add a translation of OPL for Hebrew, Syriac, Dhivehi, Maldivian, Urdu, Assyrian, Mandekan, ... ?? It's only about translating a few sentence. I'll provide the corresponding font (I have already the hebrew one ready).
    Reply With Quote  

  9. #9  
    fawzisaeed is offline Member
    Join Date
    Dec 2010
    Posts
    58
    Downloads
    3
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    1--yes i tried font in that file but not support i put font below plz put this(after change name to font_Arabic.ttf) i used in my computer good but when put in sp2 that is problem
    2--i but below to you image for this problem in arabic language you must connected most letter in the word not separated letter in all word
    3--- i transelated all word and complementd 12 line in the file blow but after that this file cant mack good when put in ps2 plz help me quick the file is below
    thanks
    Attached Files
    Last edited by fawzisaeed; 02-01-2012 at 07:14 AM.
    Reply With Quote  

  10. #10  
    hominem.te.esse is offline Babylon User
    Join Date
    Mar 2011
    Posts
    221
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    4
    Likes Received
    24
    Ok now I see with the picture.

    The problem is not "spaces" between characters, but the characters themselves that are not correct.

    To be precise, the problem is about the rendering of arabic itself, which is far more complex than expected, and harder than other common language. This is because in arabic language, each glyph have 4 different rendering, depending of it's position in the word: in front, in middle, at the end or as a single character. Depending of this position, the current glyph is changed by another. This process is called "glyph substitution" and it is not handled by the freetype library.

    Have a look at the faq of freetype (the library we use to render font):

    FreeType*2 FAQ

    "What can I not do with FreeType 2?

    FreeType 2 doesn't try to perform a number of sophisticated things, because it focuses on being an excellent font service.

    This means that the following features are not supported directly by the library:

    text layout The library doesn't support text layout operations. Sophisticated features like glyph substitution, positioning (kerning), justification, bi-directional ordering, etc.m are not part of a font service in itself. They must be handled one level higher."

    So, consider the work be finished for this feature, as nothing more can be done easily. The game is over.

    I put here your lang_Arabic.lng that I corrected (you had an invalid character just before the "#" character of the first line, thus preventing it to be treated as a comment)
    Attached Files
    Reply With Quote  

Page 1 of 2 1 2 LastLast
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •