Skip to content

Commit b95a2a1

Browse files
committed
[css-inline] edit equation to calculate drop initial size
1 parent 9018ccd commit b95a2a1

3 files changed

Lines changed: 28 additions & 6 deletions

File tree

css-inline/InitialCapEquation.png

24.8 KB
Loading

css-inline/Overview.bs

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2307,12 +2307,28 @@ Drop initials are all about alignment. Reference points on the drop cap must ali
23072307
<p>The size of a drop initial is determined by the need to satisfy the required alignment. For an N-line drop initial in a Western script, the cap-height of the letter needs to be (N – 1) times the line-height, plus the cap-height of the surrounding text. Note this height is <b>not</b> the font size of the drop initial.</p>
23082308

23092309

2310-
<p>Actually calculating this font size is tricky. Given the font size F of the main text, the line-height L, the number of lines N, and the cap-height of the font c, we find the drop initial font size D to be:</p>
2310+
<p>Actually calculating this font size is tricky. For an N-line drop initial, we find the drop initial font size to be:</p>
23112311

23122312

2313+
<figure>
2314+
<img src="InitialCapEquation.png" width="604" alt="Equation to calcuate drop initial font size"/>
2315+
</figure>
2316+
2317+
<!--
23132318
<pre>
2314-
D = ((N-1) * L + c*F)/c
2319+
Font size of drop cap = ((N-1) * line-height + [cap-height of para] * [font size of paragraph])/[cap-height ratio of drop initial font]
23152320
</pre>
2321+
-->
2322+
2323+
<!--
2324+
2325+
<div>
2326+
2327+
<math display="block"><mrow><mi>Font size of drop initial</mi><mo>=</mo></mrow><mfrac><mrow><mo>(</mo><mi>N</mi><mo>-</mo><mn>1</mn><mo>)</mo><mo>&#x00D7;</mo><mi>line-height</mi><mo>+</mo><mo>(</mo><mi>cap-height ratio of para font</mi><mo>&#x00D7;</mo><mi>font size of para</mi><mo>)</mo></mrow><mrow><mi>cap-height ratio of drop initial font</mi></mrow></mfrac></math>
2328+
</div>
2329+
2330+
-->
2331+
23162332

23172333
A three-line drop initial in Adobe Minion Pro would have a font size of 61.2pt, given 12pt text, 16pt line-height and a cap-height of 651/1000 (from the font’s OS/2 table).
23182334
</div>

css-inline/Overview.html

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
</p>
6161
<h1 class="p-name no-ref" id=title>CSS Inline Layout Module Level 3</h1>
6262
<h2 class="no-num no-toc no-ref heading settled heading" id=subtitle><span class=content>Editor’s Draft,
63-
<span class=dt-updated><span class=value-title title=20140724>24 July 2014</span></span></span></h2>
63+
<span class=dt-updated><span class=value-title title=20140804>4 August 2014</span></span></span></h2>
6464
<div data-fill-with=spec-metadata><dl>
6565
<dt>This version:
6666
<dd><a class=u-url href=http://dev.w3.org/csswg/css-inline/>http://dev.w3.org/csswg/css-inline/</a>
@@ -2435,11 +2435,17 @@ <h3 class="heading settled heading" data-level=3.2 id=DropInitial><span class=se
24352435
<p>The size of a drop initial is determined by the need to satisfy the required alignment. For an N-line drop initial in a Western script, the cap-height of the letter needs to be (N – 1) times the line-height, plus the cap-height of the surrounding text. Note this height is <b>not</b> the font size of the drop initial.</p>
24362436

24372437

2438-
<p>Actually calculating this font size is tricky. Given the font size F of the main text, the line-height L, the number of lines N, and the cap-height of the font c, we find the drop initial font size D to be:</p>
2438+
<p>Actually calculating this font size is tricky. For an N-line drop initial, we find the drop initial font size to be:</p>
24392439

24402440

2441-
<pre>D = ((N-1) * L + c*F)/c
2442-
</pre>
2441+
<figure>
2442+
<img alt="Equation to calcuate drop initial font size" src=InitialCapEquation.png width=604>
2443+
</figure>
2444+
2445+
<p></p>
2446+
2447+
<p></p>
2448+
24432449

24442450
<p>A three-line drop initial in Adobe Minion Pro would have a font size of 61.2pt, given 12pt text, 16pt line-height and a cap-height of 651/1000 (from the font’s OS/2 table).
24452451
</div><p></p>

0 commit comments

Comments
 (0)