Search Unity

Problem with URDU text

Discussion in 'UGUI & TextMesh Pro' started by kaplica, Jan 18, 2019.

  1. kaplica

    kaplica

    Joined:
    Feb 20, 2014
    Posts:
    87
    Hi,

    I have the Noto font made by google which supports arabic including urdu characters. However even when adding characters as unicode range to the font, the text displays as just blocks. Any ideas?
     
  2. Hosnkobf

    Hosnkobf

    Joined:
    Aug 23, 2016
    Posts:
    1,096
    Please specify if you have this problem with the uGUI Text component or with Text Mesh Pro.
     
  3. kaplica

    kaplica

    Joined:
    Feb 20, 2014
    Posts:
    87
    Sorry, this is with text mesh pro. Arabic works fine, it is just Urdu that looks wrong, it's as if letters are't pairing correctly. Any ideas? I've tried a lot of stuff and I've been on this for weeks and can't find a fix. Arabic fixer tool from asset store also doesn't work.

    On photo is what I get, and the text next to the blue cloud icon should actually say ابتدائی
     

    Attached Files:

  4. Hosnkobf

    Hosnkobf

    Joined:
    Aug 23, 2016
    Posts:
    1,096
    I am actually not so good in reading persian letters. But could it be that the letters are in reversed order? For my humble eye it looks like this.
    Did you enable RTL (Right To Left) in the TextMesh Pro component?
     
  5. kaplica

    kaplica

    Joined:
    Feb 20, 2014
    Posts:
    87
    Yes It's RTL. I think the problem is that the letters are not pairing correctly into ligeratures although I have the presentation extension included as unicode so the ligeratures are included - VERY STRANGE
     
  6. Hosnkobf

    Hosnkobf

    Joined:
    Aug 23, 2016
    Posts:
    1,096
    So, My last idea is that you maybe didn't generated the ligature with the text mesh pro font creator. You probably need to set the Character Set to a custom range or custom file where you make sure that all characters and ligatures are included...
     
  7. kaplica

    kaplica

    Joined:
    Feb 20, 2014
    Posts:
    87
    Well the I2 localization plugin that I have, has a script that shows me all of the characters I need, and it copy them and paste into the font creator, that still does not work though. I am running out of ideas.
     
  8. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Ligatures are not currently supported which is most likely why you end up with missing / incorrect characters as most glyphs used in font features like Ligatures are not actually mapped to any unicode.

    As part of the changes required to support the new Dynamic SDF system, TMP is now able to access glyph by index.

    The first example use of that will be in the next release / preview of the TMP package where as per this post, Glyph Pair Adjustment Records (Kerning Pairs) will be defined by referencing the glyphs themselves.

    Once that new release is available, I'll be adding support for extracting Glyph Pair Adjustment records from the GPOS table which will be the first OpenType font feature supported. This will be followed by adding support for Ligatures which are contained in the GSUB table and then gradually adding support for all remaining OpenType features in the GPOS and GSUB tables.
     
    kaplica and Hosnkobf like this.
  9. kaplica

    kaplica

    Joined:
    Feb 20, 2014
    Posts:
    87
    Thanks for the explanation @Stephan_B. That explains why it's not working. I managed to buy a plugin on the asset store that fixes the Urdu. Keep up the good work on TMP :)
     
    Stephan_B likes this.
  10. zulqarnain26

    zulqarnain26

    Joined:
    Feb 12, 2018
    Posts:
    7
    @kaplica which plugin did you buy to write urdu ? please share the link
     
  11. kaplica

    kaplica

    Joined:
    Feb 20, 2014
    Posts:
    87
  12. Liason23

    Liason23

    Joined:
    Oct 8, 2020
    Posts:
    3
    @kaplica This link didnt show any specific plugin for urdu can you send it again?