Text Indent em Rule
Text indent pixel value for caller selected em rule; not universal typographic convention.
Description
Convert an em-based text indent to pixels.
An em-based text indent scales with the declared font size. This converter calculates a pixel indent from the chosen em multiplier.
When to use this tool
Convert an em-based text indent to pixels. Use it when the input measurements and conventions below match the operation you need.
- Prepare fontPx, indentEm, 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.
fontPx must be positive and indentEm nonnegative. indentPx equals fontPx times indentEm.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| fontPx | Font px. Pixels. | Finite number; greater than zero |
| indentEm | Indent em. Em units. | Finite number; zero or greater |
| Output field | Interpretation |
|---|---|
| result | Object containing the following named result fields. |
| result.indentPx | Indent px; use the stated units and sign convention. |
{
"input": {
"fontPx": 16,
"indentEm": 1.5
},
"output": {
"result": {
"indentPx": 24
}
}
} Limitations and assumptions
- The result is a numerical conversion. CSS inheritance, writing mode, hanging indents, layout rounding and actual text formatting are not applied.
- 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
- cap height percent of em
Cap-height percentage of em from measured cap-height and units-per-em font metrics.
- column count from text width
Column packing accounts for N−1 gutters between N columns.