This content has been marked as final. Show 4 replies
>the font's x-height ...
Where'd you get that idea?
A quick test suggests (nlines - 1) x lineheight + caps height -> new caps height. Some experimentation with the line height did not quite reveal *at which point* this is measured; however, it may be as simple as the first character after the drop cap.
InDesign (obviously) has instant access to font parameters such as x-height and cap height, but if you want to do the calculations yourself, you'll need some tricks to get these values.
Maybe I wasn't elaborate enough in my question, but you hit the problem
on the head.
Where and how does InDesign measure the top of the character?
You are correct that it looks at the next character (you can tell this
by changing the size of the next character), but it clearly isn't
looking at its outlines (you can tell this by trying a lower case x and
then an upper case H). It also seems clear to me that it isn't looking
at the x-height or cap height (I tried changing the x-height within the
font and it still produced the same results).
So what exactly is InDesign looking at to decide how much to scale the
>clearly isn't looking at its outlines (you can tell this by trying a lower case x and then an upper case H)
You lost me there. I actually tested myself with a lower case x and upper case H, with a few different fonts. My display suggests the uppercase H is aligned correctly at the top with caps on the first line and its bottom with lowercase bottoms (no descenders, of course).
The only font out of, oh, four or five, that clearly did not align was Mistral, but who'd want to use that for drop caps anyway :-)
Fonts come with a lot of pre-defined values, and both cap and x height are in there somewhere, but AFAICT the only values ID needs to know are:
(a) Cap height of the drop character. Taken from the font, even if you type a lowercase. To calculate the size, you need the percentage of height w.r.t. the font design square, or (actual cap height)/(font size). [Post-Edit: Perhaps you should measure this from the baseline, as this takes up a huge swank of the design square.]
(b) Cap height of the font in the plain text. Taken from the font, usually as a percentage, even if the text contains just lowercase. If you have a text size and you want the size in points, it's (caps height)*(font size).
(c) Leading of ... well, not quite clear. I'd hazard it's taken from the first character after the drop cap itself.
Given these values, you can calculate a size for the drop cap:
((nlines-1) * (c) + (b)) / (a)
[From memory, but I think that is correct.]
No reference to x height needed. The cap height percentages itself are taken right out of the font, and we know ID can do that because it's an option for Top Alignment in text frames.
Just a couple of things about this I am still not understanding.
1) In (a), how far up do you measure? Until the cap height defined in the font?
2) Why does the drop cap get smaller if I increase the point size of the character directly following the drop cap. According to this formula shouldn't it get bigger?
I tried this formula with Minion Pro and it worked perfectly. The cap height came out to be about 65% of the point size. Then I tried it on a different font where the cap height was 96.5% of the point size and the drop cap was much larger than what the formula spit out.
I agree with you that we need to get the lead * lines-1 + size of first line of text, but I am having a difficult time trying to figure out how InDesign decides the size of the first line of text.
ID is definitely looking at some metric within the font, I just don't know what it is and it's driving me nuts.