Dropped initial ideas
#5
Open
opened 4 years ago by ergl
·
3 comments
Loading…
Reference in New Issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
I'm wondering what's the best way to handle initials, especially dropped initials. For raised initials, I'm basically doing the following, which works "fine":
For dropped initials, I thought of using the above, combined with
font-baseline-shift
. The problem with that is that the following text has to reflow accordingly. Looking at mbutterick/quad#37 I see that baseline shift is intended for sub/superscript text, and not this. I wonder if you have any ideas of how this could be supported.Dropped initials (I call them drop caps, but it’s the same thing) are more difficult because a) the top & bottom of the letter want to align with the adjacent text and b) the adjacent text needs to wrap around the letter. Currently Quad has no way to wrap text around objects, and probably won’t for a while (it’s difficult and AFAICT isn’t needed that often in real-world layouts)
Looking at the example below, however, we could imagine a way of approximating a drop-cap wrap by a) indenting the first few lines by a fixed amount and then b) layering the drop cap over the empty space. I’m a little stuck on this one, because though I know how I would express this in Racket (= pass a procedure to the line-wrapper that generates the width of each line) I’m not sure how I would express it in Quad markup (though I’m open to suggestion).
Yes, I think this sounds right. From taking a cursory look at how the lettrine latex package does it, you specify the amount of lines you want your initial to cover.
Perhaps having an option like
first-line-indent
that allows you to indent several lines, instead of just one? Specifying vertical alignment for the initial is more complicated, I'm not sure how to go about that.My hunch is that it should go the other way: that there should be a general mechanism for setting the wrap width by line, and that
first-line-indent
then becomes a special case of that mechanism.