Typesetting in LC -- Line Spacing
Peter Bogdanoff
bogdanoff at me.com
Mon Dec 5 15:29:24 EST 2016
As far as I can tell, you only have 2 choices for a field: fixed and non-fixed line height.
Fixed—uses, of course, your input setting.
Not-fixed—uses a default based on the size of the text within a particular line, or the size of an image referenced in the htmlText "img src" tag (the imageSource property of a character). And if there is no larger text or image, then it seems to set the line height to the default used by fixed line height.
You could try to fake it by setting the field to not fixed line height, and then force-adjust particular lines by setting the text size of an invisible character like a space, or using a transparent (or not noticeable) image source.
However, this last solution may not give you your desired default height for the main body of text (unless you set <all> the spaces to a larger size).
Peter Bogdanoff
On Dec 5, 2016, at 11:19 AM, Sannyasin Brahmanathaswami <brahma at hindu.org> wrote:
> Our design team here has high expectations for typesetting that are not easily implemented in LC… or were not before.
>
> But I realize new text styles have been introduced… though I believe thorough docs/tutorials have not been issued so it is a bit opaque. Where are the new text style command documented? I just spent 20 minute in the dictionary… not finding what I thought was the "new text formatting stuff" I could have been mistaken...
>
> I see a textShift option, but this is from 1.0 so I don't think it is part of the new styles… the entry under "textStyle" talks about an array but this is also from as far back as 5.0.2
>
> Where are all these defined? Or am I thinking that there is something there is not?
>
> USE CASE:
>
> There are times where you want to tighten the spacing between lines, aka "change the leading" because the default gives way too much space…same problem in browsers where a default of 1.5 over X height is a common leading default that you have to override with some tedious CSS… but then when you get into running, wrapping text you do want to keep more open line-height for readability.
>
> Given the following text in a field
>
> -----------
>
> Headline # at font size 2X
>
> Sub-head # at font size 1.5 X
>
> blank line
>
> body text # at font size 1 X
>
> --------------
>
> Can we now control the line height above and below the headlines in this example… i.e. control over the baseline of a given line in relation to the baseline of the previous line? i.e. variable spacing between lines in the same field.
>
> BR
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list