Crisp and sharp Retina fonts

Fonts aren’t supersharp on the Retina display – possibly it was an issue before on iPad 2 and it’s just more “in your eye” on Retina display.

For instance, try creating a 1024x768 iPad project with letterbox scaling (using @2x graphics for Retina etc.), then write a text font size 18 using native.systemFontBold and a color like e.g. rgb(237,255,168). The result looks a bit blurry, not as sharp as the rest of the app.

It would be a great feature to have extra sharp fonts! With Retina, users may get more used to it, too, surfing the web with Safari etc., making non-sharp fonts stick out even more.

(If I’m doing something wrong and there’s a way to get sharp fonts, would love to hear how.)

Thanks! [import]uid: 10284 topic_id: 23493 reply_id: 323493[/import]

Have you tried using display.newRetinaText in your 1024x768 letter box scaling? Or double your display.newText size and scaling down to 0.5 for xScale and yScale. Does it look sharper that way? [import]uid: 12979 topic_id: 23493 reply_id: 94249[/import]

Thanks for pointing out this function. But I don’t understand – shouldn’t scaling be done automatically? My code doesn’t even “know” if I’m on a Retina display, after all (though I could check it by parsing system.getInfo(‘architectureInfo’)). I thought the point was that scaling is automatic. And what happens on non-Retina display if you only use display.newRetinaText()? Should we just always use Retina, and it will degrade well on non-Retina iPads? [import]uid: 10284 topic_id: 23493 reply_id: 94257[/import]

I know Apple said something about the auto scaling on the new iPad. I think that is apply to their native UI apps or webpages?

So far display.newRetinaText works on both non retina and retina iPhone. It will show up as normal scale in non retina device, and sharper in retina device. I think display.newRetinaText is just like display.newText double up with 0.5 scale. =) Remember to test the position of the text across retina and non retina devices if you use display.newText will 0.5 scale. It might not be as accurate as shown in simulator (from my pass experience).

So to develop for the NEW iPad and old iPad, display.newRetinaText will be fine for both of them. =) [import]uid: 12979 topic_id: 23493 reply_id: 94271[/import]

So now I tried. Turns out, display.newRetinaText will have a different size on iPad 3 than on iPad 2. This of course destroys the dynamic scaling aspect, as you would need to detect the iPad version and adjust font-sizes manually if you want to use Retina size. [import]uid: 10284 topic_id: 23493 reply_id: 94431[/import]

display.newRetinaText is generally pretty bad for iPads.

I’ve just resorted to using the normal display.newText, then setting the font size to 30, then setting the x and y scale to 0.3. By doing that the text comes out nice and sharp.

That should also display the same on the ipad3 as it would on the ipad2. I can’t test that though as i don’t have an ipad3, so don’t hold me to that :smiley: [import]uid: 69826 topic_id: 23493 reply_id: 94434[/import]

While wrongly scaled, display.newRetinaText does look very sharp though on iPad 3 (as opposed to display.newText on iPad 3). I will see if I’m writing my own workaround that will adjust font sizes seamlessly depending on iPad model. [import]uid: 10284 topic_id: 23493 reply_id: 94436[/import]

Regarding retina text:

display.newText() has been modified to handle “retina text” automatically, and therefore display.newRetinaText() has been deprecated since it is no longer needed.

The changes will be reflected in the next daily build (the one posted *after* 2012.770). [import]uid: 52430 topic_id: 23493 reply_id: 94915[/import]

Thats great!

Thanks for letting us know jonathan :slight_smile: [import]uid: 69826 topic_id: 23493 reply_id: 95095[/import]