Baseline Grid Align Checker
Audit multiple actual baselines against anchored grid and caller tolerance, preserving signed residuals; unlike existing single-baseline rounding, no adjusted positions are prescribed.
Description
A baseline grid has an origin and step.
A baseline grid has an origin and step. Residuals show how observed baselines depart from their nearest grid positions.1
Enter nonempty finite signed baselines/origin, positive step and nonnegative tolerance. Return signed residuals and binary strict-exceedance flags.
When to use Baseline Grid Align Checker
Use Baseline Grid Align Checker when you need to evaluate the supplied records under the calculation and evidence rules below. Native rounding chooses the larger grid index at exact half steps. No new baseline positions are prescribed.
Prepare measured font or typeset-layout values and the explicit design policy requested. For text or font bytes, use the supported syntax explained below.
How to use Baseline Grid Align Checker and understand its results
- Prepare measured font or typeset-layout values and the explicit design policy requested. For text or font bytes, use the supported syntax explained below.
- Enter observedBaselinesPx, gridOriginPx, gridStepPx, callerMaximumGridErrorPx using the field table and calculation rules, then run the tool.
- Read signedNearestGridErrorsPx, offCallerGridFlags. The explanation below defines the units, signs, ordering and any flags or placeholder values.
- If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
| Input field | Meaning | Value type; see rules below | Requirement |
|---|---|---|---|
| observedBaselinesPx | Observed baselines px | list of number | Required |
| gridOriginPx | Grid origin px | number | Required |
| gridStepPx | Grid step px | number | Required |
| callerMaximumGridErrorPx | Caller maximum grid error px | number | Required |
Enter nonempty finite signed baselines/origin, positive step and nonnegative tolerance. Return signed residuals and binary strict-exceedance flags.
residual=baseline−origin−round((baseline−origin)/step)×step Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.
| Output field | Meaning | Value type |
|---|---|---|
| signedNearestGridErrorsPx | Signed nearest grid errors px | list of number |
| offCallerGridFlags | Off caller grid flags | list of number |
{
"input": {
"observedBaselinesPx": [
10,
22,
35
],
"gridOriginPx": 10,
"gridStepPx": 12,
"callerMaximumGridErrorPx": 0.5
},
"output": {
"signedNearestGridErrorsPx": [
0,
0,
1
],
"offCallerGridFlags": [
0,
0,
1
]
}
} Limitations and assumptions
Native rounding chooses the larger grid index at exact half steps. No new baseline positions are prescribed.
Numeric inputs, where present, must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Numeric lists are limited to 10,000 entries; string lists to 128 strings of at most 128 characters each. The rules above may impose smaller limits. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors.
Alternative or Complementary methods
Use Drop Cap Lines Height Span: A drop cap spanning N lines reaches across N−1 baseline intervals plus the body cap height. Its font size also depends on its cap-height ratio. For a complementary task, use Optical Margin Alignment Checker: Optical alignment concerns visible ink edges rather than advance boxes. Signed departures distinguish overhang from inset.
References
-
Baseline Grid Align Checker — tool.io
Similar or alternative tools
- Drop Cap Lines Height Span
A drop cap spanning N lines reaches across N−1 baseline intervals plus the body cap height. Its font size also depends on its cap-height ratio.
- Optical Margin Alignment Checker
Optical alignment concerns visible ink edges rather than advance boxes. Signed departures distinguish overhang from inset.