Search Unity

TextMesh Pro Problem generating Font asset with special ligatures

Discussion in 'UGUI & TextMesh Pro' started by fsemblert, Dec 11, 2018.

  1. fsemblert

    fsemblert

    Joined:
    Oct 14, 2016
    Posts:
    13
    I have a cursive .otf font file, that has special glyph for some combinations of characters, like b followed by some vowels, or v followed by some vowels ligaduras_especiales.png .

    The problem, is the font asset creator doesn't recognize this ligatures, and when this special combinations happen, the result is not the expected. resultado.png
    How can I add this ligatures to the generated font asset?
     
    MilenaRocha likes this.
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Ligatures are not currently supported. However support for such OpenType features is something that I am working on for Unity 2019.2.

    SIDE NOTE: Ligatures do not currently show up in the Font Asset Creator because most glyphs that are the result of some type of substitution are not assigned a Unicode value. They simply exist / are referenced by glyph index in the font file.

    Although support for extracting ligature data from font files will not be available until 2019.2 and if all goes well (meaning if I get everything done and working for 2019.2), I might be able to provide basic ligature support late in the 2019.1 cycle as the new FontEngine which will be used in the next TMP release does have the ability to fetch glyphs by index to add them into an atlas texture. So although the version of the FontEngine included in 2019.1 will be missing the ability to extract ligature data, you would still be able to manually define ligatures just like you can manually define kerning pairs. Again, no promises on support for this in 2019.1 but support for the various OpenType features is coming starting with Ligatures, Diacritical Marks and Pair Adjustments (which is Kerning but coming from the GPOS table).
     
    fsemblert likes this.
  3. pratikxman

    pratikxman

    Joined:
    Jan 17, 2016
    Posts:
    2
    Hi

    Any update on this?
    Is unity 2019.2 or 2019.3 beta support Ligatures?
     
    MilenaRocha likes this.
  4. doombob

    doombob

    Joined:
    Jan 25, 2014
    Posts:
    23
    I'm curious about the current status of the OpenType features support. Specifically random substitution of glyphs for a more natural look of a handwritten font we've developed for our upcoming title. Is there any word on this? Cheers!
     
  5. Quetzal_Studios

    Quetzal_Studios

    Joined:
    Jan 2, 2017
    Posts:
    7
    It would be great if ligatures are finally supported by TMPro!
     
  6. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Indeed.

    Although progress has been slower on this than I would have liked, adding full support for OpenType font features remains a high priority. I am certainly getting more and more requests from users on this.
     
  7. Dreezert

    Dreezert

    Joined:
    Jan 25, 2017
    Posts:
    3
    Hi! Stephen any alternative way to access ligatures in textmesh pro? to implement a translation our problem currently is because ligatures doesnt work, textmesh pro translate per character, is there a way to call a character in a font asset?
     
    MilenaRocha likes this.
  8. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    The glyphs used by ligatures are not typically mapped to a unicode character. These are accessed via Opentype Font Features which is not supported yet in TMP.

    Until such support is added, you could cheat using a font editing tool to modify the font file and to map the ligatures you need to a unicode character in the private unicode range U+E000..U+F8FF (to avoid conflicts with other unicodes). This would enable you to access then using the unicode these have been mapped to.
     
  9. Dreezert

    Dreezert

    Joined:
    Jan 25, 2017
    Posts:
    3
    Thank you! Will try what you have suggested
     
  10. Tech-Unity3d

    Tech-Unity3d

    Joined:
    Apr 25, 2016
    Posts:
    11
    Hi

    Any update on this?
    Is unity support Ligatures?
     
    MilenaRocha likes this.
  11. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Font Features like Ligatures is not currently supported. However, this is something that will be supported in the future when using TMP.
     
  12. RayAndGames

    RayAndGames

    Joined:
    Sep 5, 2019
    Posts:
    9

    Hello, there. Thank you for your hard-work for these years.

    I would like to know more about how to make use of those private unicodes (U+E000..U+F8FF). Can you explain how it works? Or perhaps do you have any documentation or articles that can help me use those unicodes in Unity?

    Thanks in advance!
     
  13. lazydevx

    lazydevx

    Joined:
    Jan 3, 2017
    Posts:
    6
    Hi
    Any update on ligatures support in unity?
     
  14. Deleted User

    Deleted User

    Guest

    Any update?
     
  15. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    961
  16. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Yes. I recommend trying out the latest preview releases.

    I'll test the above case as soon as I have a chance.
     
    bitinn likes this.