Author Topic: Bottom cut off text  (Read 8903 times)

benb

  • Guest
Bottom cut off text
« on: August 16, 2013, 01:16:50 AM »
Sometimes I end up with the bottom few pixels cut off of the text in my labels. Unfortunately, I don't have any way to elaborate on "sometimes" right now. I haven't really noticed a pattern in when it happens and when it doesn't. It seems like I can make a small change to my UI and it will start cutting the text, and even if I revert the change it will still cut the text.
An example image:

benb

  • Guest
Re: Bottom cut off text
« Reply #1 on: August 18, 2013, 06:47:45 PM »
I hate to bump, but any advice on this, even a good place to start for debugging would be really appreciated.

lime-green.at

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 60
    • View Profile
Re: Bottom cut off text
« Reply #2 on: August 19, 2013, 01:38:37 AM »
The image looks like all the text is cut off bottom, not just the last line. It looks like you're using a bitmap font, check if your imported file is also cut off.

eucryptic

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 27
    • View Profile
Re: Bottom cut off text
« Reply #3 on: August 19, 2013, 03:07:07 AM »
I've seen this in my own work. It was usually because of non-pixel-perfect coordinates or scaling.
Looking at the image you posted, the text seems kind of blurry.
Have you tried hitting the "Make Pixel-perfect" button?

If that text is multi-line, is the line spacing correct?
If it's vertically center-aligned, it might not be pixel-perfect, depending on the number of lines.
You might have to get a script to call MakePixelPerfect() or whatever the function is, after you've set your button text.

benb

  • Guest
Re: Bottom cut off text
« Reply #4 on: August 20, 2013, 06:30:09 PM »
Since posting this I have restarted Unity and the problem seems to have fixed its self. What I was trying to say in my original post is that this seems to happen randomly in the same scene. Sometimes the text will be cut off, I'll make a small change or restart, and it will be fixed. This suggests to me that the problem isn't with the imported font file.

I do call the MakePixelPerfect whenever the label's position changes, so that doesn't seem to be enough. I hope I'm just missing something...

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Bottom cut off text
« Reply #5 on: August 21, 2013, 10:24:16 AM »
Make sure your game window's dimensions are even. Ie: 1280x720 is even. 1281x720 is not.

benb

  • Guest
Re: Bottom cut off text
« Reply #6 on: August 22, 2013, 06:26:32 AM »
Alright, thanks. I'll keep that in mind the next time it comes up.

gretty

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 13
    • View Profile
Re: Bottom cut off text
« Reply #7 on: December 12, 2013, 06:34:13 PM »
I found that if I make sure that the label's depth is higher than any background widgets that it fixes the problem.