Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Sharpenning text

Discussion in 'UGUI & TextMesh Pro' started by MadJohny, Aug 22, 2014.

  1. tpainton

    tpainton

    Joined:
    Jun 4, 2014
    Posts:
    16
    Works
    Works like a charm. Thanks for that.
     
  2. tpainton

    tpainton

    Joined:
    Jun 4, 2014
    Posts:
    16
    Works
    Works like a charm. Thanks for that.
     
  3. NullTerminated

    NullTerminated

    Joined:
    Jun 12, 2015
    Posts:
    1
    I didnt have such problems in the screen space modes, but did have this problem in the world space. The easiest way to fix the problem and works well is to change the dynamic pixel settings on the Canvas Scaler component. This setting will vary much depending on the size of the canvas. Increasing the number of dynamic pixels will increase the resolution. Warning! i am not sure how this effects performance! Obviously, the more pixels that must be rendered the more processing it takes to render. I am not sure if this has a dramatic effect on performance.
     
  4. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,268
    While this can make text appear less blurry, it's pretty unreliable when paired with a Canvas Scaler—unless you do all sort of finicky dynamic adjustment. We could really just use better text in Unity's UI, full stop. TextMeshPro is not a complete solution without an InputField (teased for over a year) and it comes with the risks of investing in a 3rd party plugin, besides.
     
  5. chai

    chai

    Joined:
    Jun 3, 2009
    Posts:
    84
    Ya this trick is nice, but doesn't seem to work with layout group (e.g. vertical)
     
  6. Lennie3

    Lennie3

    Joined:
    Jul 30, 2012
    Posts:
    16
    I just want a simple text for a score number and not all Canvas baggage or DirectX stuff.
    I will be using it for Mobile. Nothing Unity3d has done in their scripting is easy. Everything
    takes hours and hours to work. I write nearly all of my own functions and only use Unity for
    the 3D engine. I should do the same as my son (GTA director) and program in C++ not
    Javascript but I am 75 years old.
    Lennie Benzies
     
  7. KazYamof

    KazYamof

    Joined:
    Jun 26, 2015
    Posts:
    59
    Just using this topic to a relevant doubt:

    There is any way to have a sharp text in a World Space Canvas? Everytime the camera gets too close of my text, the text looks blurred and pixelated. Canvas Scale doesn't help if I change the camera distance, and I cant figure out a proportion between Dynamic Pixel Per Unit and the distance between the text and the camera to create a dynamic update function. I'm still stuck on using GUIText and doing the conversion of the 3D space position to 2D space position. I expected more from a game engine... It's unbelievable have to buy an asset like TextMesh Pro to have a decent text when using a professional game engine, or I'm doing something very wrong on my configurations.
    text bug.png
     
  8. jtsmith1287

    jtsmith1287

    Joined:
    Aug 3, 2014
    Posts:
    787
    Dang. So what good did all those bugs do? This is still an issue many months later. If I want crisp text I have to make a huge canvas, scale down, then make huge fonts and scale those down. Super stupid. I just get blurry fonts now because I use font sizes as references and if I skew them just for crispness it makes my life pretty painful.

    I hear "File bugs, file bugs" and RARELY do I ever see a response like, "Ok we fixed it" or "Ok we find the issue and are now working on a fix". It's like filing bugs are just a nasty black hole.
     
    Xain and Ghosthowl like this.
  9. Alwaysusa

    Alwaysusa

    Joined:
    Oct 3, 2015
    Posts:
    6
    This issue is still relevant for our project. Different objects with the same text settings render either perfectly, or corrupted. The type of corruption depends on how you render the font (smooth/hinted raster etc), but they are corrupted none the less. We have buttons with scroll windows to show detail text that look fine in one panel hierarchy, and corrupted in another - and the settings are identical.
     
  10. Naphier

    Naphier

    Joined:
    Aug 4, 2014
    Posts:
    114
    Still an issue especially in World Space. Seems the only way to work with this is to scale down the text object and set the font size higher. If this is what consistently works then it would be nice if Unity would integrate it into their font rendering so that we don't have tremendously sloppy layouts. It's a pain to work with this and try to use any of the layout groups.
     
  11. tosiabunio

    tosiabunio

    Joined:
    Jun 29, 2010
    Posts:
    115
    I had enough of this and invested in TextMesh Pro. All problems gone plus I have plenty of new features not available in the standard Unity. Grab it before it goes out of beta and will be even more expensive. If you have a lot of text that needs to be sharp, this purchase is no brainer.
     
    davidrochin, Ghosthowl and Stephan-B like this.
  12. Rodiaz89

    Rodiaz89

    Joined:
    Apr 11, 2014
    Posts:
    136
    Wow, after 2 years and this is still an issue? I wouldn't like to do the scaling fix since it's not reliable and it just seems like a hack...
    The main issue I believe is with the Canvas Scaler which changes the scale of the canvas Rect Transform...

    One thing that I did notice that "helps" is when you set the canvas scaler to "Scale with Screen Size" and then play with the width and height so the canvas Rect Transform's scale is close to 1,1,1.
    The other one which I don't like one bit is to set the UI Scale mode to Constant Physical Size but then it doesn't scale depending on the device resolution...

    Does anyone else have any other solution to this?
     
  13. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,773
    TextMeshPro
     
    AcidArrow and tosiabunio like this.
  14. PhantomSarcasm

    PhantomSarcasm

    Joined:
    May 6, 2016
    Posts:
    2
    I am that this response is too late for some (say many, I have seen the comments and are old enough) if they have the solution I think this is the most feasible ..... forgive my English'm using google translator :)
    to create a dropdown that comes with an invisible gameobject "enabled" which brings another more ...... template-viewport-content-iten this brings a gameobject "label"; activate all gameobject father and modify the size, scala and the text size that fits pole the longest option group option ..... like when we get the text look better to scale them



    I am newbie like any rookie but I have to try to disaggregate things :) :) :) :)
    I hope you run to me run

    I'm using google translator understand me a little my English is lousy :) :) :) :) :)
     

    Attached Files:

  15. Dubtoker

    Dubtoker

    Joined:
    Feb 11, 2016
    Posts:
    6
    I'm using a Scroll view thang for a score and rewards page... I use transparent png for the text, as an image from gimp and the text is super crispy... I realize its not really text its a picture of text... but works very nicely for Headings and text that doesnt need to be changed by script or updated or whatever... just thought that might help some people a bit?? a bit of a crazy option but kinda works =)
     
  16. PhantomSarcasm

    PhantomSarcasm

    Joined:
    May 6, 2016
    Posts:
    2
    It is quite simple, just change the tañano of the text font, at first disappears, but then climbed to the "T" key .... Daria us and just change the size the object with the "R" key ...
     
  17. reinfeldx

    reinfeldx

    Joined:
    Nov 23, 2013
    Posts:
    164
  18. LeRan

    LeRan

    Joined:
    Nov 24, 2015
    Posts:
    118
    It works ! It does work ! Pixel art with all fonts at last !
     
    reinfeldx likes this.
  19. eddyvor

    eddyvor

    Joined:
    Jul 12, 2016
    Posts:
    2
    increase Canvas > Canvas Scaler (Script) > Dynamic Pixels Per Unit .
    that should fix it.
     
  20. Ali_V_Quest

    Ali_V_Quest

    Joined:
    Aug 2, 2015
    Posts:
    138
    Last edited: Dec 10, 2016
  21. Marou01

    Marou01

    Joined:
    Feb 9, 2017
    Posts:
    1
    Hello!
    I had the same Issue.
    I Scaled the object Text Half on X=> 0,5 and Y=>0,5. Works Perfect for me.
    Now I can scale up my font size without having "pixeled" text
     
  22. yanjingzhaisun

    yanjingzhaisun

    Joined:
    Jun 30, 2013
    Posts:
    11
    you saved my life!
     
  23. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    The problem with using dynamic font and then increasing the font size while using 0.5 scale, is that you are actually making the characters double the size in the internal Atlas texture, which potentially will make you use a bigger atlas texture. If you are targeting mobile, that could be a huge problem.

    If you keep an eye on the active memory usage it could be fine, but as soon as you start switching languages or using lots of texts in your scene, it could become a problem.
     
  24. pointcache

    pointcache

    Joined:
    Sep 22, 2012
    Posts:
    577
    Any updates when this will be fixed? Maybe in next 10 years?
     
    Gua and twobob like this.
  25. AccentDave

    AccentDave

    Joined:
    Nov 16, 2015
    Posts:
    43
    Not holding my breath
     
  26. pointcache

    pointcache

    Joined:
    Sep 22, 2012
    Posts:
    577
  27. thunderbuns

    thunderbuns

    Joined:
    Dec 22, 2017
    Posts:
    5
    Dam finally someone figured it out
     
  28. Paratrooper82

    Paratrooper82

    Joined:
    Jan 17, 2018
    Posts:
    13
    So what worked for me was scaling down the text to about 0.3 and then increasing the font size to about 50. lol...
     
  29. jstn-as

    jstn-as

    Joined:
    Apr 10, 2018
    Posts:
    4
    This tutorial goes through the process of sharpening a font and it works extremely well, I'm currently using this process for all my pixel fonts.
     
  30. rushikeshraval25

    rushikeshraval25

    Joined:
    Dec 6, 2018
    Posts:
    1
    Thanks brother
     
  31. jstn-as

    jstn-as

    Joined:
    Apr 10, 2018
    Posts:
    4
    The problem with fonts in Unity is that the filter mode of the texture is set to Bilinear whithout an easy ability to change it.
    The solution I use right now is by first setting the character of the font to Unicode, and then creating an editable copy, which exposes the texture thus allowing you to change its filter mode.
    The problem with that is the new versions of Unity are broken and can't create editable fonts.
    The way to get around this is by using Unity 2017.1.5 where it isn't broken.
     
  32. pjccccc

    pjccccc

    Joined:
    Oct 7, 2015
    Posts:
    43
    Set `character` to `Unity` that should work.
     
  33. B1QQ

    B1QQ

    Joined:
    Aug 16, 2018
    Posts:
    10
    Unicode*
     
  34. ArunabhDev

    ArunabhDev

    Joined:
    Jan 24, 2021
    Posts:
    1
    You can use TextMesh Pro to make your Text looks crisper. Look it up for more
     
  35. me2539901lreplco

    me2539901lreplco

    Joined:
    Nov 11, 2021
    Posts:
    35
    Just use TMP