Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Fuzzy/Blurry Text when I build
Started by Keen_Ha Jul 21 2019 03:02 AM

3 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Keen_Ha

[GLOBAL: userInfoPane.html]
Keen_Ha
  • Observer

  • 3 posts
  • Corona SDK

Hey, just wondering whether someone could help me out. When I build with MacOS, all the display.newText's go blurry/fuzzy and are not clear. In the simulator they seem fine. I don't know why this is happening. Any help would be appreciated. 

 

Thanks

 

Harrison



[TOPIC: post.html]
#2

Keen_Ha

[GLOBAL: userInfoPane.html]
Keen_Ha
  • Observer

  • 3 posts
  • Corona SDK

I think it might be due to the size of the build compared to the size allocated in build.settings (320x480). But when I view it in corona simulator, I view it as a custom device of 1600x2400 which is the same ratio. So why doesn't it work?



[TOPIC: post.html]
#3

XeduR @Spyric

[GLOBAL: userInfoPane.html]
XeduR @Spyric
  • Corona Geek

  • 1,034 posts
  • Corona SDK

Without seeing any code, all anyone can do to help is guess. Do you perhaps scale the text objects after you've created them?

 

You should prepare a small sample project that demonstrates your issue. That way others can see if the issue lies with Corona or with your code.


  • Keen_Ha likes this

[TOPIC: post.html]
#4

aleksi.eeben

[GLOBAL: userInfoPane.html]
aleksi.eeben
  • Observer

  • 1 posts
  • Corona SDK

I'm using this workaround:
 

function retinaText(params)
    if params.fontSize then
        params.fontSize = params.fontSize * 2
    else
        params.fontSize = 24
    end
    local o = display.newText(params)
    o.xScale = 0.5
    o.yScale = 0.5
    return o
end
 
text1 = display.newText( { text = "display.newText() - Blurry", x = 200, y = 300, font = "Times New Roman", fontSize = 14})
text2 = retinaText( { text = "retinaText() - Sharp", x = 200, y = 350, font = "Times New Roman", fontSize = 14})

 

Attached File  Screenshot (macOS build).png   20.14KB   0 downloads

 

display.newText works fine on Retina mobiles, but on macOS with Retina display it looks like the text is rendered at half resolution, then stretched up to 2x.

 

retinaText renders the text in double size and immediately scales down to 50% before returning the rendered text object.

 




[topic_controls]
[/topic_controls]