[WASTE-list] weTagLineSpacing

Marco Piovanelli marco.piovanelli at pobox.com
Wed May 3 17:47:49 EDT 2006


On Wed, 3 May 2006 12:46:43 -0500,
Nancy A. Lee (Nancy.Lee at rrd.com) wrote:



>What is the correct way to specify the line spacing for a paragraph?

>For example, if a paragraph has text size = 14 pts and leading = 18.25 pts.

>- Should I use relative or absolute spacing?


I guess that depends on what you want to happen should the user increase
or decrease the font size. If you want line spacing to remain 18.25 pts
regardless of font size, use absolute line spacing, like this:

WELineSpacing lineSpacing;

lineSpacing.mode = weTagLineSpacingAbsolute;
lineSpacing.value = FloatToFixed(18.25);

On the other hand, if you want line spacing to be approximately 18.25/14.0
times, or about 30% taller than, the default line height, then use relative
line spacing -- the actual height will adjust to the font size of the largest
style run on the line.

WELineSpacing lineSpacing;

lineSpacing.mode = weTagLineSpacingRelative;
lineSpacing.value = FloatToFixed((18.25 - 14.0) / 14.0);

Note that when specifying relative line spacing, a value of 0.0 means
default line spacing, 0.5 means one-and-half line spacing, 1.0 means
double line spacing, etc.

There's also a third mode, named weTagLineSpacingAtLeast. This is kind
of like weTagLineSpacingAbsolute, but it will not allow the line height
to go below its natural (default) height.


>Also - I want to incorporate an Auto leading feature. If the user selects

>"auto" - then I want to set the line spacing to the font size * 1.156. How

>would I set the mode and value fields for WELineSpacing to accomplish this?


You would use the weTagLineSpacingRelative mode with value set to 0.156
(expressed as a Fixed number).


-- marco

--
It's not the data universe only, it's human conversation.
They want to turn it into a one-way flow that they have entirely
monetized. I look at the collective human mind as a kind of
ecosystem. They want to clear cut it. They want to go into the
rainforest of human thought and mow the thing down.



More information about the WASTE-list mailing list