Search Unity

TextMesh Pro Italics is... too italicized? How to customize?

Discussion in 'UGUI & TextMesh Pro' started by MrLucid72, Jun 3, 2019.

  1. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    988
    Is there a way to customize <i> (without making it a <style>)?

    Currently, the italics sort of bends into other words (adding +1 space normalizes it, but that's super ghetto):



    It seems to just be TMPro and not the font, as doing the same thing in Wordpad (same font) seems to space it perfectly:


    I also noticed that there's too much space between italics start and too little space for when it ends.

    Also notice the INTENSITY of the italics! It's like 40 degrees curved to the right -- a bit too intense than wordpad, for example: TMPro is double or even triple the degrees to the right.

    I almost feel like it's a bug, as -1 space to begin and +1 space to end would normalize it perfectly.
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    You can adjust the Italic Style / Slant for each font asset via the Font Asset Inspector as seen below.

    upload_2019-6-3_12-39-8.png

    I also added a new attribute to the italic tag which provides control over the slant for individual blocks of text. The tag format is as follows: <i angle=20>Text</i>

    In terms of the character spacing before and after, the slant angle most certainly affects how it looks and depending on the characters before and after it can look fine to not so fine. I'll take a look to see if I can tweak this.
     
  3. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Already made the "tweak".

    Here is an example of the before and after using the following text : "You can use <i angle=30>Telepathy</i> to ...".

    upload_2019-6-3_13-46-45.png

    The change adjusts the position of the italic text by an amount proportional to the slant / angle.
     
    Last edited: Jun 3, 2019
  4. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    988
    Incredible! You're the most responsive Unity dev I've ever run into. Do I get these updates via package manager, or wait for a new Unity 2019 version?

    I'm currently in 2018, but I can probably try 2019, if required.
     
  5. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    These changes will be in the next release of the TMP package. These will be version 1.4.2 for Unity 2018.4 and 2.0.2 for Unity 2019.x.
     
  6. WookieWookie

    WookieWookie

    Joined:
    Mar 10, 2014
    Posts:
    35
    @Stephan_B it seems you've hardcoded a minimum angle of 15, although it's not in degrees. I need mine set to 5 degrees (whatever equivalent units that is), and it's not feasible to include an HTML modifier on every piece of copy. Why is there a minimum at all, and how do I change it?