Class DropCapMeasurer
Phase 171 (WQ-0151): Word's numbers for a drop cap, measured from the faces the engine draws with, for SetDropCap(WordDocument, DocumentPosition, Paragraph, DropCapSettings, DropCapGeometry).
public static class DropCapMeasurer
- Inheritance
-
DropCapMeasurer
- Inherited Members
Remarks
Measured over COM on 640 caps (tools/Probe-WordDropCapSizes.ps1: Calibri, Cambria, Times New Roman,
Arial; 11 and 12 pt; single, 1.08, 1.5 and exact 18 pt lines; 1 to 10 lines; the letters O and T) and checked in
Word's PDF. With P the text's line pitch (its face's line box at its size, times the multiple; an exact rule's
value), the cap paragraph's exact line is floor(N x P); the cap's size S makes the first dropped character's glyph
(yMax - yMin) as tall as (N - 1) x P plus the text's size less its descent, so that the glyph runs from the top of
the first line's em box to the N-th line's baseline; and its lowering puts the glyph's bottom on that baseline,
the cap's own baseline being four fifths down its exact line (WQ-0150) and the first line's the line box less the
descent (an exact rule's, four fifths of it). The size is a whole half-point, rounded half up (639 of 640 exact);
the lowering is a whole half-point from the target in whole twips (621 of 640; the rest one half-point, ties).
The faces are the engine's: where the bundle stands in for a face, its glyph is the substitute's (Carlito's O is 0.8 % taller than Calibri's, Liberation Sans' T 4 % shorter than Arial's), so the cap fills its lines as the engine draws it, a half-point or two from Word's number.
Methods
- Measure(WordDocument, Paragraph, DropCapSettings, FontEngine)
The geometry of a drop cap for a paragraph (or the one it has, changed): its size, lowering and line, and the space after the paragraph has.