Re: [css-gcpm][css-figures] float-offset & line rhythms

On Sat, 2014-01-25 at 19:45 -0800, Brad Kemper wrote:
> > On Jan 25, 2014, at 2:21 PM, Håkon Wium Lie <howcome@opera.com> wrote:
> > 
> > one can easily set the same rhythm by setting the same font &
> >    line-height properties. This would cover most use cases, I think.
> 
> Sorry, but the line-height property really sucks for baseline
> alignment, because it only sets the minimum height of the line. All it
> takes to royally screw it up is a <sup> or an <img>.

That's true. A typographer/designer has to make a decision: do you make
the line height enough to allow for superscripts and subscripts?

Often what happens in print is that the superscript crams itself very
close to the line above, but is small enough to fit.

Another way to resolve it is to have a half-line-height grid, and allow
an extra 0.5vs space (there isn't actually a CSS unit for line height
unfortunately, it's not the same as em, and when you're working with a
fixed baseline grid it's not a percentage of the em either, as different
font sizes must still align on the same grid). If you allow 0.5v before
and after paragraphs you may get a show-through problem, but if not, you
can have a fairly slick appearance and still get away with the extra
0.5v for an occasional  superscript or subscript that's too large to
squeeze inside.

Note, I'd expect marginalia, initial caps, figure boxes etc. also to
align to the baseline grid - and, if appropriate, running headers and
footers.

> IMO, what we need here for rhythm layouts and baseline alignment is a
> true 'linespacing' property that spaces all the lines of a block to an
> exact measure (inheritable as an exact height). Thus, if I set
> 'linespacing: 14px' on a paragraph, then the lines would be spaced
> 14px from baseline to baseline, just like leading, even if it meant
> the line boxes might overlap a little.
Yes.

>  The tolerance for how much they could overlap could be set with
> 'line-spacing-tolerance: <height>', and if 2 lines overlapped by more
> than that much then the second line would be moved down to the next
> multiple of the 'linespacing' value. Or maybe the tolerance could be
> based on the largest leading value in the fonts being used on that
> line or something.

Yes, needs experiments.

Liam

-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org freenode/#xml

Received on Sunday, 26 January 2014 04:31:43 UTC