Optical Margin Alignment Checker
Audit measured visible ink edges rather than advance boxes against caller optical margins/tolerance, preserving signed overhang versus inset; not automatic optical alignment.
Description
Optical alignment concerns visible ink edges rather than advance boxes.
Optical alignment concerns visible ink edges rather than advance boxes. Signed departures distinguish overhang from inset.1
Enter aligned nonempty ordered ink edges, ordered column pair and nonnegative tolerance. Return signed departures and indices where either absolute departure strictly exceeds tolerance.
When to use Optical Margin Alignment Checker
Use Optical Margin Alignment Checker when you need to evaluate the supplied records under the calculation and evidence rules below. No outlines are read or positions automatically corrected.
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 Optical Margin Alignment 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 lineInkLeftEdgesPx, lineInkRightEdgesPx, declaredColumnEdgesPx, callerOpticalEdgeTolerancePx using the field table and calculation rules, then run the tool.
- Read leftOpticalEdgeDeparturesPx, rightOpticalEdgeDeparturesPx, outsideCallerEdgeToleranceLineIndices. 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 |
|---|---|---|---|
| lineInkLeftEdgesPx | Line ink left edges px | list of number | Required |
| lineInkRightEdgesPx | Line ink right edges px | list of number | Required |
| declaredColumnEdgesPx | Declared column edges px | list of number | Required |
| callerOpticalEdgeTolerancePx | Caller optical edge tolerance px | number | Required |
Enter aligned nonempty ordered ink edges, ordered column pair and nonnegative tolerance. Return signed departures and indices where either absolute departure strictly exceeds tolerance.
leftDeparture=inkLeft−columnLeft; rightDeparture=inkRight−columnRight Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.
| Output field | Meaning | Value type |
|---|---|---|
| leftOpticalEdgeDeparturesPx | Left optical edge departures px | list of number |
| rightOpticalEdgeDeparturesPx | Right optical edge departures px | list of number |
| outsideCallerEdgeToleranceLineIndices | Outside caller edge tolerance line indices | list of number |
{
"input": {
"lineInkLeftEdgesPx": [
-0.5,
0,
1
],
"lineInkRightEdgesPx": [
101,
100,
99
],
"declaredColumnEdgesPx": [
0,
100
],
"callerOpticalEdgeTolerancePx": 0.5
},
"output": {
"leftOpticalEdgeDeparturesPx": [
-0.5,
0,
1
],
"rightOpticalEdgeDeparturesPx": [
1,
0,
-1
],
"outsideCallerEdgeToleranceLineIndices": [
0,
2
]
}
} Limitations and assumptions
No outlines are read or positions automatically corrected.
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 Hanging Punctuation Offset em: Hanging punctuation translates a glyph relative to a margin using its measured bearing and advance. Optical preference remains caller-selected. For a complementary task, use Baseline Grid Align Checker: A baseline grid has an origin and step. Residuals show how observed baselines depart from their nearest grid positions.
References
-
Optical Margin Alignment Checker — tool.io
Similar or alternative tools
- Hanging Punctuation Offset em
Hanging punctuation translates a glyph relative to a margin using its measured bearing and advance. Optical preference remains caller-selected.
- Baseline Grid Align Checker
A baseline grid has an origin and step. Residuals show how observed baselines depart from their nearest grid positions.