Line-Gap Override Zero Default Check
Check whether actual measured font line gap is zero; CSS normal does not itself guarantee zero.
Description
Check whether a supplied measured font line-gap metric is exactly zero.
A font's line-gap metric can influence how applications construct line boxes. This checker asks only whether a supplied measured line-gap value is exactly zero.
When to use this tool
Check whether a supplied measured font line-gap metric is exactly zero. Use it when the input measurements and conventions below match the operation you need.
- Prepare measuredLineGapUnits, 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.
measuredLineGapUnits must be nonnegative. The returned flag is the exact equality comparison with zero.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| measuredLineGapUnits | Measured line gap units. | Finite number; zero or greater |
| Output field | Interpretation |
|---|---|
| result | Object containing the following named result fields. |
| result.hasZeroMeasuredGap | Has zero measured gap flag under the exact conditions described above. |
{
"input": {
"measuredLineGapUnits": 0
},
"output": {
"result": {
"hasZeroMeasuredGap": true
}
}
} Limitations and assumptions
- The tool does not read a font file, inspect CSS or establish a browser default. Other ascender, descender and line-height settings can still affect rendered spacing.
- 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.
- fallback font metrics override ascent descent
Font metrics overrides and size-adjust scaling interact.