Search Unity

In unity, tibetan unicode is supported yet stacking of Tibetan letter doesn't render properly.

Discussion in 'UGUI & TextMesh Pro' started by tashiwangdue, Sep 1, 2021.

  1. tashiwangdue

    tashiwangdue

    Joined:
    Aug 28, 2020
    Posts:
    7
    I have been trying to solve this Tibetan rendering problem for quite sometimes now, because of lack of my skills i am not able to tackle the problem, I have done some research and find similar problem faced in other threads and it all wasn't that helpful to solve the problem. Help needed please.

    Tibetan writing itself is complicated, there are layers of stacking, lots of substitutions required in order to display the writing in the correct form of the language, I think Tibetan fonts make extensive use of GSub table and GPos Tables.

    example here is very self-explanatory.
    https://docs.microsoft.com/en-us/typography/script-development/tibetan
    I am using unity .
    • Unity 2020.25f1 personal
    • My fonts are all set to Dynamic.
    • I am using Unicode 16.
    problem 1. unity is not able to substitute for letters correctly.
    problem 2. unity is not able to stack the letters correctly.
    problem 3. unity is not able to use exiting render engine.

    Any fix available or any thread that discuss earlier and I have missed out, or impossible to solve within unity standard. Please help! from all the kind hearted genuis.

    thank you so much in advance.
     

    Attached Files:

  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    The latest preview release of the TMP package which is version 3.2.0-pre.1 does include support for Diacritical Marks.

    Currently, the Mark-to-Mark and Mark-to-Base tables have to be manually populated but support for extracting this data from the GPOS table will be available in the near future. This will require a new version of the Unity Editor is this new functionality is part of the Font Engine and not the TMP package.

    Support for Ligatures will also be coming in a future preview release of the TMP package. Support for extracting this data from the GSUB table will come at the same time as support for GPOS.

    As such, I would suggest you get familiar with TextMesh Pro. Please consider watching the following two videos about font asset creations, dynamic vs static font assets and localization.



     
  3. tashiwangdue

    tashiwangdue

    Joined:
    Aug 28, 2020
    Posts:
    7
     
  4. tashiwangdue

    tashiwangdue

    Joined:
    Aug 28, 2020
    Posts:
    7
    Hello Mr. Stephan_B from unity,

    when do you think this support of ligature, GPos and Gsub data extraction in future release ? how soon ? i was familiar with TMP, fallback system and specially I use glyph adjustment table to display Tibetan nicely. for me glyph adjustment table is like rule book for rendering text in a correct way but still it is not supporting well.
    Since unity does not support Gsub, (substitution) when any consonent become superfix (top apex of stacking) it form changes and i will have to substitute with another proper form so I will have to edit glyph height of the consonent and this method has strong impact on over all look of the Tibetan font, it looks very ugly and not readable.

    I would like to know and begging you a help hand for this.
     

    Attached Files:

  5. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    Like I said in my previous post, support for Diacritical Marks is available in the current preview releases of the TMP package. However, you do have to populate those tables manually but unlike Glyph Adjustment Pairs, this works as expected for Diacritical Marks.

    With respect to extracting this data from the GPOS and GSUB table, this is something I am currently working on an expect to have available within the next 30 - 60 days or less. Not sure yet if I will be able to backport these changes all the way back to 2019.4 but I will try to do so.

    In terms of Ligatures, this is something that I am planning on adding in one of the upcoming preview releases. Similar to the new Diacritical Marks tables, you will have to populate these manually at first which will be simple given there is no positional data involved. Having said that, once the changes to extract the data from the GPOS and GSUB tables lands, this will also allow us to extract the ligature data as well.

    Can you please provide me with a sentence to use for testing Tibetan along with a link to a font file. I can certainly find random text and font to test from the internet but I prefer getting those and working with users on this.

    Once you provide me with this text and font, I will be able to provide samples to get yours and other users' feedback.
     
  6. tashiwangdue

    tashiwangdue

    Joined:
    Aug 28, 2020
    Posts:
    7
    Hi Mr. Stephan_B,
    Thank you so much for the quick, very helpful and very hopeful reply, Supporting Diacritical Marks is very helpful, it is more helpful for many Asian script to display correctly if support for the GPos and GSUB table is available. I am very happy that you are planing to do so.

    I will be providing anything that helps make this support for data extraction from tables,
    firstly I am going to provide you with Tibetan Alphabet
    ཀ་ཁ་ག་ང་ ཅ་ཆ་ཇ་ཉ་ ཏ་ཐ་ད་ན་ པ་ཕ་བ་མ་ ཙ་ཚ་ཛ་ཝ་
    ཞ་ཟ་འ་ཡ་ ར་ལ་ཤ་ས་ ཧ་ཨ།
    Tibetan Vowel
    ཨི་ཨུ་ཨེ་ཨོ།
    following is Tibetan letter ར (Ra) subjoined with following consonant
    ྐ་ྒ་ྔ་ྗ་ྙ་ྟ་ྡ་ྣ་ྦ་ྨ་ྩ་ྫ།
    Tibetan letter ར Ra changes its form as in the following image.

    རྐ་རྒ་རྔ་རྗ་རྙ་རྟ་རྡ་རྣ་རྦ་རྨ་རྩ་རྫ།
    རྐྱ་རྒྱ་
    following is how the (ra) subjoined with another letter and changes its form
    following is Tibetan letter ལ་(La) subjoined with following consonant
    ྐ་ྒ་ྔ་ྕ་ྗ་ྟ་ྡ་ྤ་ྦ་ྷ།
    ལྐ་ལྒ་ལྔ་ལྕ་ལྗ་ལྟ་ལྡ་ལྤ་ལྦ་ལྷ།
    here it changes the size of the letter ལ་(La) very similar to the following is Tibetan letter ས(Sa) subjoined with following consonant
    how I tried to fix this problem in current TMP is with help of glyph adjustment table, but the problem is that when i write བསྒྲིགས། size of the letter ས changes and it is not eligible.

    སྐ་སྒ་སྔ་སྙ་སྟ་སྡ་སྣ་སྤ་སྦ་སྨ་སྩ།
    when following letter is subjoined with vowel position of the letter is change so much that can not able to read.
    ཀྱ་ཁྱ་གྱ་པྱ་ཕྱ་བྱ་མྱ་
    ཀྲ་ཁྲ་གྲ་ཏྲ་ཐྲ་དྲ་ནྲ་པྲ་ཕྲ་བྲ་མྲ་ཤྲ་སྲ་ཧྲ།
    ཀྱུ་ཁྱུ་གྱུ་པྱུ་ཕྱུ་བྱུ་མྱུ།
    ཀྲུ་ཁྲུ་གྲུ་ཕྲུ་བྲུ་སྲུ་
    so support for the GSUB and GPOS is very critical for rendering Tibetan letters correctly.
    following is correct ways to display and comparison unity rendering Tibetan letter incorrectly and it is attached with the post. rendered.png rendered.png
    རྐྱེན་བསྐྲུན་རྒུར་རེ་ལུགས་འཁོར་རྒྱུགས་བསྒྲིགས།གུགས

    I am using google Noto Fonts https://www.google.com/get/noto/#sans-tibt.
    I am using Unity Version 2020.2.5f1 personal

    thank you so much in advance. If there is anything I can do or provide any language specific information please let me know and i will provide everything i know as soon as possible.

    with much regard
    tashi wangdue
     
  7. tashiwangdue

    tashiwangdue

    Joined:
    Aug 28, 2020
    Posts:
    7
    Mr. Stephan_B,

    how is the progress? you have mentioned earlier that “ With respect to extracting this data from the GPOS and GSUB table, this is something I am currently working on an expect to have available within the next 30 - 60 days or less. Not sure yet if I will be able to backport these changes all the way back to 2019.4 but I will try to do so. ”

    Is there anyway I can test your changes. The changes you have made for textmesh pro data extraction from GPos and Gsub.

    I would like to test with my language “Tibetan”
    I think I can help tou with providing quick feedbacks. I am very excited to do so.

    with best regards.
    Tashi Wangdue.
     
  8. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    Still working on it all. I am planning on having this available and backported to 2019.4.
     
  9. tashiwangdue

    tashiwangdue

    Joined:
    Aug 28, 2020
    Posts:
    7
    Mr. Stephan_B,

    it's been a while, hope you have finished backporting new TextMesh pro with new data extraction from GPOS and GSUB.

    I was really hoping for using your great app.

    with much regard
    Tashi Wangdue.
     
  10. tashiwangdue

    tashiwangdue

    Joined:
    Aug 28, 2020
    Posts:
    7
    Mr. Stephan_B,

    it's been a while, hope you have finished backporting new TextMesh pro with new data extraction from GPOS and GSUB.

    I was really hoping for using your great app.

    with much regard
    Tashi Wangdue.