Description
Add fontCapHeight+(spanLines-1) × lineHeight+baselineAdjustment, require a nonnegative result, and divide by fontCapHeight for scale.
Typography combines several distinct scales: font size describes an em scale, cap height describes a font metric, leading describes baseline spacing, and variable-font axes select design coordinates. Ratios between them require an explicit convention.
Add fontCapHeight+(spanLines-1) × lineHeight+baselineAdjustment, require a nonnegative result, and divide by fontCapHeight for scale.
When to use this tool
Use Baseline Grid Dropcap Line Span when you need to compare supplied type metrics or font-axis values on a consistent basis.
How to use the tool and how it works
- Enter fontCapHeight, lineHeight, spanLines, baselineAdjustment. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read targetHeight, scale. Use the output convention below.
Require positive fontCapHeight and lineHeight and positive integer spanLines. Add fontCapHeight+(spanLines-1) × lineHeight+baselineAdjustment, require a nonnegative result, and divide by fontCapHeight for scale.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| fontCapHeight | Font Cap Height | Required. Finite number; strictly above 0. |
| lineHeight | Line Height | Required. Finite number; strictly above 0. |
| spanLines | Span Lines | Required. Safe integer; minimum 1. |
| baselineAdjustment | Baseline Adjustment | Required. Finite number. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| targetHeight | Target Height | Required. Finite number. |
| scale | Scale | Required. Finite number. |
{
"input": {
"fontCapHeight": 10,
"lineHeight": 12,
"spanLines": 3,
"baselineAdjustment": 0
},
"output": {
"targetHeight": 34,
"scale": 3.4
}
} Limitations and assumptions
- Lengths share units and adjustment is signed; this is a supplied drop-cap height model without glyph shape, actual font rendering, alignment verification, or readability assessment.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Read actual font metrics and variation tables when available, then proof the text in its intended renderer. A metric calculation cannot replace shaping, glyph inspection, or an actual layout test.
References
Similar or alternative tools
- Baseline Grid Half Step Rule
Normalize coordinate around origin, round to the nearest grid index, resolve exact half steps by the selected policy, and return index and snapped coordinate.
- Baseline Grid Phase Offset
Reduce baseline-origin modulo step into [0, step) and divide by step for fraction.