Line height control for display.newText()

It would be very useful (and potentially low hanging fruit) to let us specify a line height for display.newText if we need a tighter or looser display than the default.

perhaps a method like:

 text = display.newTest("How Now Brown Cow: The rain in Spain falls mainly on the plain.", 0, 0, 128, 64, "Helvetica", 32)  
 text:setLineHeight(28)  

[import]uid: 19626 topic_id: 29336 reply_id: 329336[/import]

+1 surely! [import]uid: 89165 topic_id: 29336 reply_id: 117915[/import]

+1

Here’s what the default line height looks like for us on wrapped text. It’s as tall as the lines themselves!
http://i.imgur.com/25avU.png [import]uid: 135827 topic_id: 29336 reply_id: 117944[/import]

george18,
I believe that has to do with the font itself. That is the problem… different fonts have different heights. You can take the font into a program like Fontographer and adjust it.

But I agree that being able to specify a line height that overrides the font would be great.

Ideally, you would be able to set an override based on the particular line of text, or based on the font that is being used. For example, if I use “Zapf Chancery” then set the line height at 16. [import]uid: 17827 topic_id: 29336 reply_id: 119480[/import]

Definitely a +1 from me. [import]uid: 17827 topic_id: 29336 reply_id: 119481[/import]

Do you guys have the problem where the line height doesn’t double up when viewing in retina display? This results in the text appearing to be closer together. [import]uid: 70056 topic_id: 29336 reply_id: 122272[/import]

Falcon777,
Can’t say that I have seen that on the iPhone 4.

Don’t have a new iPad yet, so haven’t seen my iPad app there yet, but from what I have heard from people testing it, no one has reported having any scrunched up text. [import]uid: 17827 topic_id: 29336 reply_id: 122276[/import]

thegdog,

Do you mean your line height gets double when viewing on retina display? [import]uid: 70056 topic_id: 29336 reply_id: 122278[/import]

Falcon777,
Yes. While I have never directly tested this, I will use my Universal app as an example. I have it coded to use the iPhone as the base reference. Since I do not have an iPhone, I have tested it on the iPad and the iPhone 4, as well as both of those in the Simulator (along with the iPhone and new iPad in the Simulator).

The text appears in the same relative position on all of them in the Simulator, and in hardware, the iPhone 4 displays text as I expect it to.

I cannot be sure the line height is exactly doubled, but I could say that the text filled its containing area (that, through an image, I had marked the borders of) the same way on the iPhone and iPhone 4.

Since this thread was originally for a new feature request, you should probably create a new thread in the Developer Support section and include some screenshots so people can see the issue exactly. With some simple reproducible code, people might be able to help better. [import]uid: 17827 topic_id: 29336 reply_id: 122334[/import]

Do you guys have the problem where the line height doesn’t double up when viewing in retina display? This results in the text appearing to be closer together. [import]uid: 70056 topic_id: 29336 reply_id: 122272[/import]

Falcon777,
Can’t say that I have seen that on the iPhone 4.

Don’t have a new iPad yet, so haven’t seen my iPad app there yet, but from what I have heard from people testing it, no one has reported having any scrunched up text. [import]uid: 17827 topic_id: 29336 reply_id: 122276[/import]

thegdog,

Do you mean your line height gets double when viewing on retina display? [import]uid: 70056 topic_id: 29336 reply_id: 122278[/import]

Falcon777,
Yes. While I have never directly tested this, I will use my Universal app as an example. I have it coded to use the iPhone as the base reference. Since I do not have an iPhone, I have tested it on the iPad and the iPhone 4, as well as both of those in the Simulator (along with the iPhone and new iPad in the Simulator).

The text appears in the same relative position on all of them in the Simulator, and in hardware, the iPhone 4 displays text as I expect it to.

I cannot be sure the line height is exactly doubled, but I could say that the text filled its containing area (that, through an image, I had marked the borders of) the same way on the iPhone and iPhone 4.

Since this thread was originally for a new feature request, you should probably create a new thread in the Developer Support section and include some screenshots so people can see the issue exactly. With some simple reproducible code, people might be able to help better. [import]uid: 17827 topic_id: 29336 reply_id: 122334[/import]

+1 for letting us specify a line height for display.newText

+1 for letting us specify a line height for display.newText