Vertical Rhythm Multiplier Base Unit
Vertical rhythm spacing from a caller baseline unit and integer multiplier.
Description
Calculate a pixel spacing as an integer multiple of a chosen baseline unit.
A vertical rhythm can use integer multiples of a chosen baseline unit. This calculator turns that design convention into a pixel spacing.
When to use this tool
Calculate a pixel spacing as an integer multiple of a chosen baseline unit. Use it when the input measurements and conventions below match the operation you need.
- Prepare baselinePx, multiplier, respecting the measurement basis and boundaries below.
- Compare the worked example with your intended operation before reusing its result.
How to use the tool and how it works
- Enter every field in the input table using the stated units and exact supported selector spelling where applicable.
- Run the tool. Correct input errors before interpreting an output.
- Read the result fields below; use accompanying flags and the stated sign, boundary or model convention when interpreting a number.
baselinePx must be positive and the multiplier a nonnegative integer. The returned spacing is baselinePx times multiplier.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| baselinePx | Baseline px. Pixels. | Finite number; greater than zero |
| multiplier | Multiplier. | Integer; from 0 to 1000000 inclusive |
| Output field | Interpretation |
|---|---|
| result | Object containing the following named result fields. |
| result.spacingPx | Spacing px; use the stated units and sign convention. |
{
"input": {
"baselinePx": 4,
"multiplier": 6
},
"output": {
"result": {
"spacingPx": 24
}
}
} Limitations and assumptions
- The calculator does not measure text or guarantee baseline alignment after font substitution, line wrapping and layout rounding.
- Every declared field is required and unexpected fields are rejected. Numeric inputs must be finite; input errors are distinct from a valid false result or an explicitly qualified output.
- Extremely large inputs and nonfinite or excessively large outputs are rejected. List positions reported by the tool use zero-based indices unless stated otherwise.
Alternative or Complementary methods
Compare the metric calculation with the intended font and rendered text. Font shaping and layout inspection are more appropriate when the task depends on actual glyph positions or reading conditions. Compare the scope of the nearby tools below before substituting one.
References
Similar or alternative tools
- ch unit line length checker
CSS ch measures the zero glyph’s advance.
- q unit millimeter japanese
Millimetres from CSS Q units; one Q is exactly one quarter millimetre.