- Home /
Achieving Crisp Pixel Perfect Text --> Best Practices?
I have an application I am working on that will run under Unity iOS on a first gen iPad. I need a way of displaying crisp dynamic text that will be entered in by the user at run-time and I want to take this text and display it ontop/infront of the word balloon image. While I can currently get the text and display it infront of the balloon both the text and balloon are coming out very pixelated on the device.
I am aware of and have tried guitext and Unity GUI but want to know if there are better alternatives.
I have also tried a 3D Text mesh, but I'm finding the text is still coming out pixelated when I test on the actual device. Does anyone know of any sites or tutorials, or have and advice on how to achieve really crisp dynamic text and images under Unity iOS? Any ideas or thoughts would be greatly appreciated!
When you say test on the actual device, are you deploying it or are you using unity remote to view it on the device? if using the remote it will be pixelated.
As of now, unity iOS does not support dynamic fonts. Your best bet is to find the size that is most ideal, and export it at that given size.
Previously, when I came across a similar issue, I had to have 4 different font files for the same font so that I could show them crisp across iOS devices of differing gens and types. If you're using Unity's built-in GUI system, I honestly think that's the only approach that you have right now.
Using a third party plug-in such as NGUI would be my optimal suggestion, if you don't $$anonymous$$d spending the money.
I'm deploying the build to a real device each time. I am also trying 2DToolkit, but still seeing some significant pixelation happening. I also develop native iOS apps via the raw sdk and I'm used to extremely sharp graphics and text...just wondering how close to the crispness of a native sdk App people been able to get and the techniques they used to achieve this.
I did the same as Dannyskim. I imported 3 fonts (arial in my case) of different point size and the fonts look crisp on all devices I've tried them on old/new iPhone and new iPad.
It it pretty much required that you opt for an orthographic camera, or can you still achieve nice crisp results with a perspective camera?
Answer by Bampf · Apr 30, 2012 at 08:53 PM
• For textures, the trick is to avoid scaling, and instead use pixelOffset to position the texture. Or you can get away with using a large texture on a large/retina display, and displaying it at exactly half-size on other displays.
Note that if you go this approach you may end up writing a lot of code to calculate the pixel position of almost every GUI element you want to draw, and its got to handle every size screen.
For the balloon around your text, you might consider using a GUIStyle, in effect drawing it like a GUI button. You can customize the texture that defines the button's border and background.
If you do it this way you'll have to draw the tail of your balloon separately. You could just make it a thin line from the balloon to the whoever is speaking, for instance.
• I don't know a reason why your text would look pixellated with UnityGUI. It shouldn't.
Answer by tonic · Aug 20, 2014 at 01:44 PM
(adding an answer to older question in case you're still looking for info about this, or if somebody else finds this using Google search...)
If you're willing to use a separate asset, you could give my thing a try. It's meant to work like a replacement to built-in Text Mesh, so it is part of the scene and works with world coordinates. But it still looks just as sharp as GUIText. It supports both orthogonal and perspective cameras (you should just make sure the text stays perpendicular to camera, i.e. don't rotate neither camera nor object). Link here: Pixel-Perfect Dynamic Text
Your answer
Follow this Question
Related Questions
Keyboard triggered animation not showing on IOS device 0 Answers
App crash when using siri dictation to replace text on iOS 0 Answers
Reading & Writing to text file After building for iPhone. 2 Answers
iPhone Controller Asset 0 Answers
Screen.sleepTimeout works when application runs in background on iOS (iPad) 0 Answers