Welcome,
Guest
. Please
login
or
register
.
June 04, 2023, 03:15:03 PM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
About font fuzzy
« previous
next »
Print
Pages: [
1
]
Author
Topic: About font fuzzy (Read 4365 times)
shokinhan
Guest
About font fuzzy
«
on:
August 21, 2012, 08:04:30 AM »
Some times the label's font are very clear, but some times the fonts are fuzzy! Why?
Logged
PhilipC
Guest
Re: About font fuzzy
«
Reply #1 on:
August 21, 2012, 09:23:00 AM »
It would be due to them not being pixel perfect. Try hitting Alt-Shift-P
Logged
shokinhan
Guest
Re: About font fuzzy
«
Reply #2 on:
August 22, 2012, 03:17:38 AM »
The code:
newObj.GetComponentInChildren<UILabel>().text = text;
newObj.GetComponentInChildren<UILabel>().MakePixelPerfect();
So i have done!
Logged
shokinhan
Guest
Re: About font fuzzy
«
Reply #3 on:
August 22, 2012, 03:18:24 AM »
The code:
newObj.GetComponentInChildren<UILabel>().text = text;
newObj.GetComponentInChildren<UILabel>().MakePixelPerfect();
So i have done!
But the font are fuzzy some times also.
Logged
Nicki
Global Moderator
Hero Member
Thank You
-Given: 33
-Receive: 141
Posts: 1,768
Re: About font fuzzy
«
Reply #4 on:
August 22, 2012, 05:19:09 AM »
Make absolutely sure there's not an object higher in the hierarchy that has it's position in an "off float" like 0.23 or whatever. Every transform all the way down to your labels should be integers.
Logged
shokinhan
Guest
Re: About font fuzzy
«
Reply #5 on:
August 22, 2012, 07:52:05 AM »
There's not an object higher in the hierarchy ? Does your means no another object's z or depth is higher than label font?
Logged
PhilipC
Guest
Re: About font fuzzy
«
Reply #6 on:
August 22, 2012, 10:23:45 AM »
You dont have any other objects higher in the hierarchy? That seems a little wrong. Can you show us an image of your hierarchy view?
Also please try Alt-Shift-P in the editor i know you have code running to "make pixel perfect" but try the short cut.
Logged
shokinhan
Guest
Re: About font fuzzy
«
Reply #7 on:
August 22, 2012, 11:11:59 PM »
The objects "Desc" ,"Level" and "Title" are text, "Icon" and "UIToolBG" are picture sprite.
This is a tooltip's hierarchy. Thanks!
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: About font fuzzy
«
Reply #8 on:
August 22, 2012, 11:25:15 PM »
Per-pixel labels will only happen if all of these conditions are met:
Your UI is 2D.
You are using UIAnchor with "half-pixel offset" checked.
Scales of all objects leading up to your labels are (1, 1, 1), excluding UIRoot.
Positions of all objects leading up to your labels use integer numbers: ie (1, 2, 3) instead of (1.23, 2.34, 3.45).
None of the objects leading up to your labels have been rotated.
Your actual label is pixel-perfect (Make Pixel Perfect button).
Logged
shokinhan
Guest
Re: About font fuzzy
«
Reply #9 on:
August 23, 2012, 01:30:32 AM »
I do the tooltip, so the tooltip can be moved around the cursor, so the tootip will happen per-pixel, but how to resolve this problem ?
Thanks!
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: About font fuzzy
«
Reply #10 on:
August 23, 2012, 02:03:56 AM »
I'm not sure I understand what you're asking. The tooltip should already be pixel-perfect, assuming you followed the same structure as in the Character example.
Logged
shokinhan
Guest
Re: About font fuzzy
«
Reply #11 on:
August 24, 2012, 05:15:14 AM »
If i have drag the uilabel, should i invoke the function MakePixelPerfect() ?
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: About font fuzzy
«
Reply #12 on:
August 24, 2012, 05:20:18 AM »
Sure, that would help. However I suggest dragging the panel, not the label. Also when you drag the panel you can just Mathf.RoundToInt() on the XY components instead of calling makepixelperfect.
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
About font fuzzy