Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

TextMesh Pro Tamil Font Support

Discussion in 'UGUI & TextMesh Pro' started by vasanthbalaji, Jul 31, 2019.

  1. vasanthbalaji

    vasanthbalaji

    Joined:
    Nov 15, 2014
    Posts:
    34
    Tamil Letters are getting broken and misplaced characters when using tamil fonts in textmesh pro.

    Original word in Tamil- பழவேற்காடு
    Tamil.PNG

    Misplaced character வேற்

    How to resolve this issue, i tried with several fonts, but im getting same result.Could anyone Help me.
     
  2. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    6,588
    Tamil like many other languages relies on OpenType features such as Diacritical Marks, Glyph Substitution and Ligatures which is not currently supported in TextMesh Pro. Support for these features is planned.

    Looking at the particular example you provided, there are 3 different issues. The first is the position of over the . This we can address by creating a glyph adjustment pair in the Glyph Adjustment Table as such (values will be different depending on the font). Note the ID is the index of the glyph and not its unicode.

    upload_2019-7-31_12-5-43.png

    The and might be a chaining context substitution but I think (not sure since I don't understand the language) we might be able to also define an adjustment pair to reverse them as seen below.

    upload_2019-7-31_12-10-24.png

    Then the last combination of and appears to be a ligature that results in டு which is not currently supported.

    With the exception of the last substitution this is the result with the adjustments

    upload_2019-7-31_12-29-43.png

    Support for these features is coming. I don't have a firm ETA yet.
     
  3. vasanthbalaji

    vasanthbalaji

    Joined:
    Nov 15, 2014
    Posts:
    34
    @Stephan_B

    Thank you for your reply, i have adjusted nearly 63 pairs by seeing your example provided in the reply,which was difficult to adjust all 63 pairs , as these pairs are mostly used .I have same font with different weight items, light,medium and bold.since i have adjusted pairs in bold, how to copy paste adjusted pairs in medium and light, as adjusting 63 pairs in tamil is difficult.





    GlyphAdustment.PNG
     
  4. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    6,588
    Right now this manual process is pretty difficult / horrible.

    Once support for OpenType Font Features is available (no firm ETA yet but this is something I am working on) this process will be much easier as the glyph positional adjustment and substitution data will be extracted from the font file itself.

    In terms of potentially, copying the data from one font asset to the other, you might be able to create a script where you grab the relevant data from the fontFeatureTable of one font asset and then re-assign the "internal" m_GlyphPairAdjustmentRecords to the other. Note these are marked as internal but since the package includes source code, you should be able to modify these for your needs. This is certainly note ideal but it might save you time.

    P.S. Hopefully the glyph index remain consistent between the Light and Medium typefaces as copying the data would then be pointless as it would reference the incorrect glyphs.
     
  5. vasanthbalaji

    vasanthbalaji

    Joined:
    Nov 15, 2014
    Posts:
    34
    @Stephan_B

    Font weights have different glyph ids, if i do manually and adjust pairs and if attach bold n medium font asset in light font weight properties , will it work properly.


    Fontweights.PNG
     
  6. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    6,588
    I suggest testing just a few pairs but this should work between pairs within each font asset but not across them since the glyph indexes are not the same.
     
  7. vasanthbalaji

    vasanthbalaji

    Joined:
    Nov 15, 2014
    Posts:
    34
    @Stephan_B

    I just tested with one pair and checked its working ,eventhough glyph index are not same glyphweight.PNG
     
  8. vasanthbalaji

    vasanthbalaji

    Joined:
    Nov 15, 2014
    Posts:
    34
    @Stephan_B
    Hi, Any update on Tamil Font Support .im eagerly waiting for this support in unity
     
  9. vasanthbalaji

    vasanthbalaji

    Joined:
    Nov 15, 2014
    Posts:
    34
    @Stephan_B

    Two Months gone, Any Update on Tamil Font Support ?
     
  10. pluzmedia

    pluzmedia

    Joined:
    Aug 16, 2017
    Posts:
    2
    Any update on tamil font support? It is a mess after the game development stalled in middle due to no tamil font rendering. We wasted lot of human resources for this. Kindly throw me some light on the issue.
     
  11. vasanthbalaji

    vasanthbalaji

    Joined:
    Nov 15, 2014
    Posts:
    34
  12. legendarysoulbow

    legendarysoulbow

    Joined:
    Sep 9, 2022
    Posts:
    3