Font Size problem

Hey guys

so my problem is…

why I get this blur in my text when I run in iPad ?
see in iPhone the text works fine and its clean
but if I run in iPad I get this blur around the text… the text is not clear

don’t exist a textRect like imageRect ?

thanks [import]uid: 23063 topic_id: 16743 reply_id: 316743[/import]

Are you using display.newText() to put text on the page or are you using display.newImage() or display.newImageRect() to load in graphics with text or are you using the native.textField()?
[import]uid: 19626 topic_id: 16743 reply_id: 62675[/import]

Check out the latest daily build 2011.645

There are new added core functions about display.newRetinaText
[import]uid: 89165 topic_id: 16743 reply_id: 62679[/import]

I say imageRect for an example of what i’m talking about
but yea, i’m using display.newText

soo I gonna take a look into this display.newRetinaText

thank you so much [import]uid: 23063 topic_id: 16743 reply_id: 62683[/import]

Well for imageRect you’re loading in a graphic that is X x Y pixels in size. By default, these graphics are assuming an iPhone 3ish graphics scale (320x480). The iPad,while not a retina display is 1024x768, so Corona scales your graphics up to fit the iPad’s scale.

When you rez-up a graphic 2X, text is going to blur. This is why display.newImageRect() is smart enough if you provide the same graphic, double sized with an @2x suffix on the image name, it will use the higher resolution graphic on iPhone4’s and iPads.

Example, you have a button that says “Play” called “playbtn.png”. Its a 64x48 pixel PNG image. If you only provide that one image, Corona is going to upscale it to 128x96 pixels and that process softens the text.

If you create a second button that is 128x96 is size in addition to the smaller version, and name it “playbtn@2x.png”, then display.newImageRect will opt to use the higher resolution graphic and things will look better.

Your config.lua has to have some information for it to use the @2x image. Here is my default config.lua

if system.getInfo("model") ~= "iPad" then  
 application =   
 {  
 content =  
 {  
 width = 320,  
 height = 480,  
 scale = "letterbox",  
  
 imageSuffix =   
 {  
 ["@2x"] = 2,  
 },  
 },  
 }  
  
  
else  
   
 application =   
 {  
 content =  
 {  
 width = 384,  
 height = 512,  
 scale = "letterbox",  
 imageSuffix =   
 {  
 ["@2x"] = 2,  
 },  
 },  
 }  
   
   
   
   
end  

[import]uid: 19626 topic_id: 16743 reply_id: 62688[/import]

What is the parameters for display.newRetinaText?

Don’t have in APIs :S [import]uid: 23063 topic_id: 16743 reply_id: 62690[/import]

I’m getting ready to try it and see. I would assume its the same as display.newText with the new optional multi-line parameters:

display.newText(text, x, y, [width, height,] font, fontsize)

Well it appears that .newRetinaText() does not support multi-line, though it takes the parameters for width and height.

I just called display.newEmbossedText(text, x, y, font, fontsize) and it worked. The reference point is different. I had to specifically specify display.CenterReferencePoint… But the embossing should have additional parameters to control the size, blur, direction and color.

Perhaps we will get a blog post from Ansca today on the new features with examples.

[import]uid: 19626 topic_id: 16743 reply_id: 62694[/import]

@robmiracle, I’ve been wondering how I might emboss my text (while I can do it in buttons, I couldn’t do it on my text objects). Glad to know display.newEmbossedText exists – but how on earth did you know about it? I couldn’t find it in API or Doc section.

I now feel like there are whole loads of things that are missing from API / Doc section and I’m missing out on many things I could make a good use of…

Naomi [import]uid: 67217 topic_id: 16743 reply_id: 62701[/import]

@Naomi, as a paid subscriber, you have access to the daily builds. With each daily build, there are release notes. Sometimes the release notes are obvious like they are today, sometimes they are more cryptic like native.textField working in the simulator now.

Also, they usually do a blog post once a week that covers some of the new things in the daily builds.
[import]uid: 19626 topic_id: 16743 reply_id: 62706[/import]

Thank you, @robmiracle! I guess Ansca does not always update the API / Doc until they release a stable build. I’ll keep a better eye on the release notes from now on.

Thanks again!

Naomi [import]uid: 67217 topic_id: 16743 reply_id: 62715[/import]

sorry but newRetinaText dont work :T

still this blur around the letters [import]uid: 23063 topic_id: 16743 reply_id: 62717[/import]

Can you post your code? Are you using the latest daily build from today? [import]uid: 19626 topic_id: 16743 reply_id: 62727[/import]

navHeader = display.newRetinaText("Noticias", 0, 0, native.systemFontBold, 16 )  
navHeader:setTextColor(255, 255, 255)  
navHeader.x = display.contentWidth\*.5  
navHeader.y = navBar.y + 7  
navGroup:insert( navHeader )  

yea, I’m using today build
645 if i’m not wrong [import]uid: 23063 topic_id: 16743 reply_id: 62728[/import]

I’m getting that as well Dhennrich, I’m guessing you’re talking about the simulator? When you build for device it will get crisp, it’s just blurry in the simulator [import]uid: 14018 topic_id: 16743 reply_id: 64058[/import]

not at all
in the device the problem is the same
still this blur around the letters [import]uid: 23063 topic_id: 16743 reply_id: 64062[/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: 16743 reply_id: 94942[/import]