text height / text size

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Da_Elf
Posts: 311
Joined: Sun Apr 27, 2014 2:45 am

text height / text size

Post by Da_Elf » Sun Jan 17, 2016 6:05 pm

I want the line height between lines to be set. but then after i change the text size the line height goes back to default. im using text height to set the distance between lines. how else can i do this?

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: text height / text size

Post by bn » Sun Jan 17, 2016 7:51 pm

If you want to show text higher from the baseline, more in between the lines use textShift.

Code: Select all

set the textShift of char 1 to - 1 of field "myField" to - 5
experiment with values from - 3 on downwards.

If this is not what you want please explain.

What you observe is the normal behavior. If the fixedLineHeight of a field is true, which it is by default, you can set the textHeight to any value you want but when changing the textSize the textHeight returns to the value for this textSize. You could set the textSize and then in the same script the textHeight to your desired value though.

Kind regards

Bernd

Da_Elf
Posts: 311
Joined: Sun Apr 27, 2014 2:45 am

Re: text height / text size

Post by Da_Elf » Sun Jan 17, 2016 11:30 pm

I had to make sure to set textheight after textsize. was hoping there was something like "leading" for fonts

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: text height / text size

Post by bn » Sun Jan 17, 2016 11:47 pm

leading can be faked by textShift, see above.

Kind regards
Bernd

Post Reply