Search Unity

Text Mesh Pro - The Ultimate Text Solution for Unity - Powerful & Flexible - Advanced Text Rendering

Discussion in 'Assets and Asset Store' started by Stephan-B, May 29, 2014.

Thread Status:
Not open for further replies.
  1. xellfish

    xellfish

    Joined:
    May 25, 2014
    Posts:
    10
    Not sure if this is the best place to post this, but on my recent quest to get garbage free text updates I noticed two issues:
    • TMP_Text.SetCharArray() doesn't seem to call SetVerticesDirty() and SetLayoutDirty(). Since pretty much all SetText variants do this I figure this might be a bug
    • Would it be possible to add an SetCharArray(char[] sourceText, int start, int length) variant? There's already an SetCharArray(char[]) and SetCharArray(int[], int start, int length), but would be nice to have the latter accept char arrays as well.
    I'm using the most recent (at least I hope so, package importer is weird) (free) version from the Asset store.
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    The variation in this gap length is due to word wrapping using xAdvance value defined in the font for each of the characters. Word wrapping isn't based on geometry or the actual visible part of the character but this xAdvance which is defined by whoever created the font file. If you were to look at each character in the Glyph Info table in the font inspector, you would see that the xadvance is different for each character and also different than the width.

    This variation in gap can also occur on the left side since the characters a drawn starting at the xOffset which in some case can be a negative value. Here is an example using a font where the number 1 has the most positive xOffset and j the largest negative xOffset. This is actually correct in terms of proper text layout. The same behavior will occur on the opposite side with the xAdvance values.

    upload_2017-6-26_14-38-15.png

    The only way to have an even gap on the left or right side, is to use alignment based on the geometry which is incorrect in terms of proper text layout.

    Now to your question, how can you get that number 12.



    If you add the utility script "TextInfoDebugTool.cs" to a text object. It will allow you to visualize these font metrics. I use this script for debugging.

    If you were to enable showing Text Bounds and Mesh Bounds, you would see this gap is 12 should be the difference in width between the text bounds and mesh bounds. Please keep in mind that the mesh bounds start at the geometry of on the left side and ends at the geometry on the right side. It can also be affected by the position of the transform (pivot) as the bounds always include it.

    Another way to determine this gap could be to check each line using lineInfo[line number].lastCharacter and comparing the advance of the line vs. top right which should be geometry. That should also give you 12 in your case.

    Give those a shot and let me know how it turns out for you.
     
  3. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    4,044
    Hey, I'm running into problems with the "Trying to remove ... (TMPro.TextMeshProUGUI) from rebuild list while we are already inside a rebuild loop. This is not supported."

    I'm not sure exactly whats happening here, but for some reason OnDisable is being fired from a call to "Camera.Render()" when dealing with an off screen camera?

    The TextMeshProUGUI label is not associated with the camera rendering and should be completely unrelated afaik. Any ideas?

    AddComponent is triggering disable which is firing the removal. Unity_2017-06-26_21-12-34.png
     
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    This behavior is the result of a change made to AddComponent which should have been addressed in subsequent releases / patches of Unity. So depending on the version of Unity and TMP that you are using, you could still be running into this.

    What version of Unity and TMP are you using?
     
  5. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    4,044
    Latest 5.6 build and latest tmp. I just updated TMP from commercial today, and 5.6 yesterday.
    ___
    EDIT: Correction I am on 5.6.1 - downloaded it earlier didn't install till yesterday. Will update.
     
  6. RazaTech

    RazaTech

    Joined:
    Feb 27, 2015
    Posts:
    178
    hi!

    Character is overflowing on horizontal.

    i m using TextMeshProUGUI.
    one TexmeshProUGIU per Character.

    now problem is its overflowing like image beneath.
    label.autozie = true.

    what could be the possible solution..?
    Thanx

    this is debug info
    upload_2017-6-27_7-32-52.png
     
    Last edited: Jun 27, 2017
  7. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    4,044
    I just updated to 5.6.2f.1 - problem persists. This is a major problem, admittedly I shouldn't have upgraded to 5.6, but rolling back at this point is a non starter.

    Any ideas on what can be done to resolve this? I'm open to dirty hacks, but I need this to work tomorrow and I cannot upgrade to beta.
     
  8. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    It is possible the xOffset of that character + width places it pass the xAdvance.
     
  9. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Are you using the free version of TMP? What is the name of the DLL located in "TextMesh Pro/Plugins/Runtime/"
     
  10. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    4,044
    vcomp120.dll
    /64 bit plugins/
    TMPro_Plugin.dll
    TMPro_Plugin.bundle

    ----

    I downloaded newest version on asset store - with deprecated notice. Is this the wrong version?
    ____

    I didn't delete old files. So this is probably the problem ?
     
  11. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    As per the release / upgrade notes, you have to remove the previous version by deleting the "TextMesh Pro" folder before importing the new one. This is required because the Asset Importer is not an installer and has no clue how to deal with files that might have been renamed or no longer necessary.

    Please always be sure to back up the project first and any files / assets you might have saved inside the "TextMesh Pro" folder as well as making a note of the TMP Settings file options in the event you changed any of them.

    Next, I can't tell if you are using the free version or if you had the paid version of TMP. Can you confirm which one you have before trying to upgrade again.
     
  12. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    4,044
    Paid version, I have been a customer for a long time.
     
  13. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    As per the Important Note on the Asset Store page of the free version, users of the paid (source code) version should not switch to the free version as these two versions are not compatible with each other due to how dlls have to be created with the free version.

    Updates for the paid (source code) version of TextMesh Pro will continue to be available on the TMP user forum as they have been over the past several years.

    So if you have not already done so, please register on the TextMesh Pro user forum which will require you provide your invoice number. Once approved, get the latest release of TMP for Unity 5.6 which is located in the "TMP - Alpha, Beta and Final Releases" section of the user forum. The top sticky thread in the section of the forum includes a Release for Unity 5.3 - 5.5, Unity 5.6 and Unity 2017.1, so make sure you get the one for Unity 5.6.

    There is also an updated TMP_Text.cs which you should get. It is linked in this thread which is linked in the new release thread.

    P.S. Again please make sure you backup the project first.
     
  14. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    4,044
    I just installed from the forum...everything works again, thank god. It may be worthwhile to note that the pack on asset store is the "free version". It is the version marked from previous purchase. I simply updated from the "asset store" window assuming this would continue to be the paid version.

    Thank you for the assistance.
     
  15. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    The paid version has been deprecated so the only version on the Asset Store is the free (dll only) version.

    I did stick the big IMPORTANT NOTE: at the top of the description of the free version to let users know about this important info. I wish I could use <flash> as a tag on the Asset Store to make this note even more visible.
     
  16. RazaTech

    RazaTech

    Joined:
    Feb 27, 2015
    Posts:
    178

    These are custom fonts make by our designers, can they tweak them .. ?
    or its textmeshpro thing? and only can be fixed with offsets?
     
  17. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    You should be able to tweak those values in the font asset editor in the Glyph Table.

    If you can provide me with a small repro which includes this font and a scene, I can also check it out for you.

    When providing Repro for me to look at, please always make sure those are via private links which is shared with me via Private Message (PM).
     
  18. Kev_DK

    Kev_DK

    Joined:
    Nov 27, 2013
    Posts:
    2
    Thank you for that very detailed explanation. In a short amount of time, I managed to get it working.

    What I was after was the Text Bounds extends, so that was very handy. In the end, what I was looking for turned out not to be the difference between the text bounds and mesh bounds, but rather the difference between the text bounds and the window size - going back to the example, the difference between 488 (which was the number I was looking for) and 500, which was my own fixed max size.



    As you point out, the xOffset of the first character does need to be taken into account as well to get it picture perfect, so I've done that too. It does seem to be only a pixel or two in the most severe cases on regular size fonts, so most people could probably skip that part and still get nice results (especially if the sprite box behind it has a wide margin).

    Again, thanks for the help!
     
  19. Zanderfax

    Zanderfax

    Joined:
    Nov 2, 2016
    Posts:
    25
    Can anyone help??

    I am trying to use the newest release of TMP and I can not get it to load a font asset. I have tried with both the included fonts and one that I generated using the Font Asset creator. In the editor, I am unable to drag a font to the Font Asset slot and when I use the drop down, it does not populate.

    Any idea what is causing the issue?

    Let me know,
    Z
     
  20. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    If this is an upgrade issue:
    Were you using another version of TMP before? If so when upgrading, you have to remove the previous version first by deleting the old "TextMesh Pro" folder. This is needed since the Asset Importer is not an installer.

    If this is a resource of file location issue:
    In order for any resource to be loaded using ResourceLoad, those assets have to be placed in a Resources folder. In order to keep things organized and more efficient, when using the <font="Name of Font Asset">, TMP will look in the folder location identified in the TMP Settings file which by default is "Resources/Fonts & Material/...".

    If you are trying to do this via scripting then take a look at Example 22 which includes a script that does both loading of a font asset and material preset.
     
  21. Anemor2000

    Anemor2000

    Joined:
    Jun 12, 2015
    Posts:
    39
    I have never heard back on this issue. Did you take a look? Could we get an update or is it possible to send some version not having this bug?

    Thanks
     
  22. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    I did implement the change on the scrolling when using a single line or when the text length is smaller than the text area.

    Since you are using the free version, you'll have to wait for the next release which I'll try to release within the next 7 - 10 days.
     
  23. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Seems like your post got wedged in between a few other yesterday so I missed it. Going forward it might be best to post in the Unity UI & TextMesh Pro section of the Unity forum, that way each post will end up being a thread and searchable by others. Make sure you select the TextMesh Pro label when making those posts.

    If the content of the text hasn't changed, SetText() simply returns. If you are setting different text and yet it is not getting processed then, that could be an issue.

    If you are using the Paid (Source Code) version of TMP, then please make sure you update to the latest release as I have made changes to SetText in the past few releases.

    If you are using the Free version, then please check the name of the TextMesh Pro DLL in the "TextMesh Pro/Plugins/Runtime/" folder as its name includes the version number.

    Also note that SetText() does generate allocation in the Editor to keep the Text Input Box in sync with the text. However, this does not happen in builds.
     
  24. RSH1

    RSH1

    Joined:
    Jul 9, 2012
    Posts:
    256
    I'm getting terrible z-fighting issues using TMPro with a world space canvas, is this a bug?
     
  25. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    You have to make sure a camera is assigned to the Canvas. In world space, if you have multiple objects with their own canvas stacked on top of each other, they'll be fighting each other.

    These text objects should behave the same way as UI Text objects behave in world space.
     
  26. AlexRyder

    AlexRyder

    Joined:
    Jul 3, 2017
    Posts:
    10
    Hi,
    I'm using the latest free version of TextMesh Pro from the asset store and I'm having a peculiar issue which may not even be related to TMP, but I haven't had it with anything else so far.

    I'm modding a game using AssetBundles (i.e. I'm not the one who builds the player) and I'm having an issue with loading TMP_FontAsset types from the bundles: when they are deserialized, the asset itself is loaded, but all fields that rely on TMP classes are deserialized as null (FaceInfo, KerningTable, KerningPair, List<TMP_Glyph>, etc.), while all of the standard and Unity's types are deserilized as expected (font Materials, glyph Sprite atlases, etc.).

    I have performed some actions to try and figure out what may be causing it, and the result doesn't make any sense.

    I made sure to use the exact same version of Unity to build my AssetBundles, I have built a simple bundle containing a TMP_FontAsset and saved it in a folder.

    Then I have built a new Unity project (it was not used to build the bundle) which doesn't have the full TMP package and only references the runtime TMP dll included in its Plugins folder — this is exactly how it is added to the modded game. The test build has a single script that loads that font asset from the AssetBundle and list the field values to the log, and it works fine from both the editor and the built player.

    But when I use the exact same script from the modded game and load the exact same asset bundle (both games are built with the same version of Unity), the "user class" fields are null. I even peeked inside the AssetBundle with UABE to check the serialized data, and all the data is filled properly, but for some reason does not load.

    I'm not sure if this is related specifically to TMP, but I have been loading various complex data into the game using AssetBundles, and this is the first time I'm experiencing such a weird issue.

    The version of Unity is 5.5.4p1.
     
  27. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,212
    Created a title last night. Went to bed, went to work, started it up again just now. Nothing will show up.
    Code (CSharp):
    1. IndexOutOfRangeException: Array index is out of range.
    2. TMPro.TMP_Text.StringToCharArray (System.String sourceText, System.Int32[]& charBuffer)
    3. TMPro.TMP_Text.ParseInputText ()
    4. TMPro.TextMeshPro.OnPreRenderObject ()
    5. TMPro.TextMeshPro.Rebuild (CanvasUpdate update)
    6. TMPro.TMP_UpdateManager.OnCameraPreRender (UnityEngine.Camera cam)
    7. UnityEngine.Camera.FireOnPreRender (UnityEngine.Camera cam) (at C:/buildslave/unity/build/artifacts/generated/common/runtime/CameraBindings.gen.cs:565)
    8.  
     
  28. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    I should have a new release out this week which will address this issue. The release for 2017.1 is already available with this change and a download link to it is available in the TextMesh Pro sticky post in the Unity UI & TextMesh Pro section of the Unity forum.

    I am hoping to have this available on Wednesday or Thursday. If it is not available by Thursday, send me a pm with the version of Unity you are using along with your email address and I can get you that release then.
     
  29. MVS_

    MVS_

    Joined:
    Jul 2, 2017
    Posts:
    4
    Hi there!

    We're using the latest TextMesh Pro in our current proyect and need to create a Custom Input Validator, but we've followed the documentation and cannot find where that option is, in any dropdown menu inside Unity. Can you please give us a lead?


    Thanks in advance.
     
  30. RSH1

    RSH1

    Joined:
    Jul 9, 2012
    Posts:
    256
    Where do I set this? I simply have one canvas, a panel child, then a background sprite child and a TMPro child in the panel. The TMPro disappears behind the image at runtime despite being positioned closer to the camera. I never used to have this issue. The issue also happens in the editor at various camera angles.
     
    Last edited: Jul 4, 2017
  31. Sylvar

    Sylvar

    Joined:
    Sep 19, 2013
    Posts:
    9
  32. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    On the FontAwesome website they list the unicode range for where their symbols / icons are located which I believe are in the F000 to F2FF unicode range.
     
  33. OniKys

    OniKys

    Joined:
    Jun 15, 2013
    Posts:
    13
    Hello! i`ve have a problem, after update plugin from asset store all text objective lost links, do you have some solution for this? http://prntscr.com/frwt33


    thx
     
  34. OniKys

    OniKys

    Joined:
    Jun 15, 2013
    Posts:
    13
    sorry, i`ve found solution, just reinstall plugin and all work`s fine
     
  35. stevenatunity

    stevenatunity

    Joined:
    Apr 17, 2015
    Posts:
    114
    @Stephan-B will the upcoming bug fix solve this issue where my text disappears? It's seems different from the error others are reporting.

    I'm on latest beta from forum and v5.6.2 Unity.

    Code (csharp):
    1.  
    2. IndexOutOfRangeException: Array index is out of range.
    3. TMPro.TMP_Text.StringToCharArray (System.String sourceText, System.Int32[]& charBuffer) (at Assets/TextMesh Pro/Scripts/TMP_Text.cs:2306)
    4. TMPro.TMP_Text.ParseInputText () (at Assets/TextMesh Pro/Scripts/TMP_Text.cs:1699)
    5. TMPro.TextMeshProUGUI.OnPreRenderCanvas () (at Assets/TextMesh Pro/Scripts/TMPro_UGUI_Private.cs:1554)
    6. TMPro.TextMeshProUGUI.Rebuild (CanvasUpdate update) (at Assets/TextMesh Pro/Scripts/TextMeshProUGUI.cs:225)
    7. UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/CanvasUpdateRegistry.cs:149)
    8. UnityEngine.Canvas:SendWillRenderCanvases()
    9.  
     
  36. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    How is the text disappearing?

    Those errors related to buffer overload, etc... should all be fixed.

    FYI: I just pushed the new release to the Asset Store so it might take a few days for it to be live.
     
    Last edited: Jul 5, 2017
  37. stevenatunity

    stevenatunity

    Joined:
    Apr 17, 2015
    Posts:
    114
    @Stephan_B thanks for the reply.

    The error usually presents itself when I first launch Unity. When I set the visibility of the object containing the text, the error messages appear and the text is blank. I close Unity and then restart and usually it's fine then.

    The good news is that it's not doing it today. I'll let you know if it does it again.
     
  38. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Let me know if this occurs again.

    Once the new releases of TMP are available from the Asset Store (1.0.55.xx.0b11) see if the behavior persists. If so please submit a bug report along with a Repro which will make it easy for me to reproduce and I'll take a look as soon as I get it.
     
    stevenatunity likes this.
  39. fuzzygoat

    fuzzygoat

    Joined:
    Feb 11, 2016
    Posts:
    29
    Hi Stephan, just trying 2017.2.0B2 with the latest TMPro from the asset store 1.0.55.0B11 and seeing the error below, I am also not seeing any text rendered in either the scene view or the game view.

    MissingMethodException: Method not found: 'UnityEngine.Mesh.Clear'.
    TMPro.TextMeshProUGUI.SetArraySizes (System.Int32[] chars)
    TMPro.TMP_Text.ParseInputText ()
    TMPro.TextMeshProUGUI.OnPreRenderCanvas ()
    TMPro.TextMeshProUGUI.Rebuild (CanvasUpdate update)
    UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at /Users/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/CanvasUpdateRegistry.cs:150)
    UnityEngine.Canvas:SendWillRenderCanvases()
     
  40. Aurigan

    Aurigan

    Joined:
    Jun 30, 2013
    Posts:
    291
    Using Unity 2017.1f3, TMP 1.0.55.0b11

    On importing TMP there's a warning:

    And seeing errors on selecting a text gameobject:

     
  41. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    A link to the latest release of TMP for Unity 2017.1 is available in the TextMesh Pro sticky post in the Unity UI & TextMesh Pro section of the user forum.

    Here is a link to the post that contains the link.
     
    Aurigan likes this.
  42. churf

    churf

    Joined:
    Oct 8, 2012
    Posts:
    5
    Can TMP make text flow around 2d bounds like TextBox2? If not, can it link multiple text boxes together, where it will send overflow to them?

    https://forum.unity3d.com/threads/text-box-2-beta.232393/

    All I really want is the ability to have 2 different width rectangles with text linked together :

    |box 1 text |
    |is linked to|
    |box 2 text that is wider|

    edit: ok looked around a bit it is called "Linked Text Overflow" in TMP awesome stuff Thanks so much for doing this

    http://digitalnativestudios.com/forum/index.php?topic=1318.0

    http://digitalnativestudios.com/forum/index.php?topic=1363.0
     
    Last edited: Jul 12, 2017
    Stephan_B likes this.
  43. SunriseRH

    SunriseRH

    Joined:
    Aug 5, 2016
    Posts:
    107
    Hi Stephan,

    I was wondering if I could get your advice with something related to TextMeshPro.

    To give some context, we are using TextMeshPro for rendering Arabic text, but due to the various edge cases of that language, we have had to write some systems around TextMeshPro to handle these. Two of these cases are alpha blending where the ligatures overlap, thus causing the overlapping areas to be more opaque than the rest of the text, and the placement of the diacritics, which are in the wrong positions.

    We solve the former by rendering the text to a rendertexture at runtime, and then disabling the TextMeshPro object and using that rendertexture on a rawimage instead. The latter is fixed by modifying the textinfo for the ligatures so that they appear above/below the correct characters. We are however encountering an issue when using both of them at the same time, where the ligature update is not reflecting on the rendertexture. I'm mainly curious as to what we could be doing incorrectly.

    To give a detailed summary of the order of operations:
    -We update the textinfo for the diacritics
    -We call UpdateVertexData(), which I believe updates both the mesh, as well as the CanvasRenderer
    -We then re-parent the text component to a separate canvas which is centered on a disabled camera
    -We modify the camera parameters to fit the text component properly, then create a rendertexture of the appropriate size. This rendertexture gets set as the target of the camera. After this we call camera.render()
    -We then create a rawimage with this rendertexture, disable the TextMeshPro component, and then put the component back where it was originally from.

    Attached are two images, one with only the diacritic fix, and the other with both the alpha and diacritic fix.

    My main questions would be the following:
    -Does the mesh get update immediately when UpdateVertexData() is called? Should the changes be reflected immediately if we call camera.render() directly afterwards?
    -Is there a better way of doing either the alpha or diacritic fix?
    -Is there anything else that we may be doing incorrectly that may be causing the text on the rendertexture to appear incorrect?

    Your help is much appreciated.

    Cheers,
     

    Attached Files:

  44. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Yes. This function does update / push the modified mesh on the CanvasRenderer.

    I am not sure since we are dealing with the Canvas. You should be able to test this. I also believe you should be able to force the canvas to update. Check the Canvas API

    As I have mentioned in other posts, I am / will be adding support for font features which includes ligatures and diacritical marks in the new integrated version of TMP (which is essentially a full re-write). Until then, manipulating the mesh to adjust the diacritical marks is fine. Alternatively and depending on the font you are using, it is possible the font might contain glyphs with the marks where you could substitute the glyph instead. For example Arial contains marks in the u+300 range. So you can combine a letter + a mark which requires positioning the mark correctly over the letter or if you look at the Latin Extended range, you also have all those letters with marks as complete glyphs. I believe for most Arabic fonts that is also true. Ie. perhaps you could substitute the glyphs instead of positioning marks.

    In terms of the alpha, that is one of the issues with SDF and script fonts which overlap. One things I have been considering is combining the individual SDF per character into a single texture / quad where you would use the MIN distance. Ie. merging the SDF data then the shader would render / apply the outline for instance on the group instead of per character. This isn't trivial to implement but would be the cleanest / flexible.

    P.S. Sorry about the delay in responding to your email.
     
  45. SunriseRH

    SunriseRH

    Joined:
    Aug 5, 2016
    Posts:
    107
    Thanks a lot for your reply! Your information on the force canvas renderer update gave me a hint on how to fix the bug :) Turns out re-parenting the uGUI object invalidates the mesh update, so I fixed it by just moving the diacritic fix to after the re-parenting step.

    Cheers,
     
    Stephan_B likes this.
  46. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,699
    Hi there,
    I love the product, but when I port to iOS, all my Custom Fonts, are Pink and Lack The Font's Characters. This looks like the material is missing.

    I went back into Unity and the material is set properly.
    What should I do?

    edit.. am getting this error (non fatal, causes no crash in Xcode).....
    ERROR: Shader Shader is not supported on this GPU (none of subshaders/fallbacks are suitable)WARNING: Shader Unsupported: 'TextMeshPro/Mobile/Distance Field' - Setting to default shader.

    WARNING: Shader Unsupported: 'TextMeshPro/Distance Field Overlay' - Pass '' has no vertex shader

    WARNING: Shader Unsupported: 'TextMeshPro/Distance Field' - Pass '' has no vertex shader


    edit..So I have done a few things, but none are working. I have adjusted the Shaders settings, and I have moved the TMP into the Resources folder. No matter what it is the same result.

    Please help.
     
    Last edited: Jul 14, 2017
  47. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    The shaders should all be working on iOS and most major mobile devices with the exception of super old devices that only support shader model 2 with additional limitations.

    Now as to why this is happening in your case, let's get more information.

    What version of Unity and TMP are you using?

    For testing, load the Example 1 included with TMP and publish it to iOS and lets see if that works as expected.

    We will go from there.
     
  48. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,699
    Hi @Stephan_B, thanks for the response.

    As for Unity, Version 5.6.1f1
    TextMeshPro is Version 1.0.55.0b11

    My device, is an iPhone 5, running, 10.3.2


    I just built out Example 1, as you asked, and installed onto the phone via Xcode, and have gotten the same results.... see pic...

    Thank you for your help. The sooner we can resolve this the better, obviously.
    Many thanks


    edit... this is the print in the Xcode console...
    Initialize engine version: 5.6.1f1 (2860b30f0b54)

    WARNING: Shader Unsupported: 'TextMeshPro/Mobile/Distance Field' - Pass '' has no vertex shader

    ERROR: Shader Shader is not supported on this GPU (none of subshaders/fallbacks are suitable)WARNING: Shader Unsupported: 'TextMeshPro/Mobile/Distance Field' - Setting to default shader.
     

    Attached Files:

  49. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    What Graphics settings do you have set? Are you using Metal or OpenGL ES 2.0 or OpenGL ES 3.0?

    Update
    Just tested a few scenes on an old iPad 2 and everything is rendering fine. I was running 5.6.2p2. IL2CPP with Graphic API set to auto.
     
    Last edited: Jul 15, 2017
  50. superzat

    superzat

    Joined:
    Mar 26, 2017
    Posts:
    6
    Having some weird edging or stair step effect going on my text, for example the "a" in dialogue. Font size is 72, Extra Padding is on and Project Setttings is set Linear Color Space instead of Gamma.

    http://imgur.com/a/D9MjE

    Untitled.png
     
    Last edited: Jul 17, 2017
Thread Status:
Not open for further replies.