Hanging Punctuation Offset em

Budget signed hanging-punctuation translation from measured bearing/advance and caller exterior fraction; no universal optical margin offset or automatic glyph shaping.

Description

Hanging punctuation translates a glyph relative to a margin using its measured bearing and advance.

Hanging punctuation translates a glyph relative to a margin using its measured bearing and advance. Optical preference remains caller-selected.1

Enter positive units/em, nonnegative advance/ink-left with ink-left≤advance and fraction 0–1. Return signed translation and remaining advance inside margin.

When to use Hanging Punctuation Offset em

Use Hanging Punctuation Offset em when you need to evaluate the supplied records under the calculation and evidence rules below. No glyph shaping or universal optical offset is supplied.

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 Hanging Punctuation Offset em and understand its results

  1. Prepare measured font or typeset-layout values and the explicit design policy requested. For text or font bytes, use the supported syntax explained below.
  2. Enter punctuationAdvanceUnits, punctuationVisibleInkLeftUnits, callerOutsideMarginFraction, unitsPerEm using the field table and calculation rules, then run the tool.
  3. Read hangingOffsetEm, remainingAdvanceInsideMarginEm. The explanation below defines the units, signs, ordering and any flags or placeholder values.
  4. 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 fieldMeaningValue type; see rules belowRequirement
punctuationAdvanceUnitsPunctuation advance unitsnumberRequired
punctuationVisibleInkLeftUnitsPunctuation visible ink left unitsnumberRequired
callerOutsideMarginFractionCaller outside margin fractionnumberRequired
unitsPerEmUnits per emnumberRequired

Enter positive units/em, nonnegative advance/ink-left with ink-left≤advance and fraction 0–1. Return signed translation and remaining advance inside margin.

offsetEm=−(inkLeft+(advance−inkLeft)×outsideFraction)/unitsPerEm

Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.

Output fieldMeaningValue type
hangingOffsetEmHanging offset emnumber
remainingAdvanceInsideMarginEmRemaining advance inside margin emnumber
json
{
  "input": {
    "punctuationAdvanceUnits": 500,
    "punctuationVisibleInkLeftUnits": 100,
    "callerOutsideMarginFraction": 0.5,
    "unitsPerEm": 1000
  },
  "output": {
    "hangingOffsetEm": -0.3,
    "remainingAdvanceInsideMarginEm": 0.2
  }
}

Limitations and assumptions

No glyph shaping or universal optical offset is supplied.

Numeric inputs, where present, must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors.

Alternative or Complementary methods

Use Optical Margin Alignment Checker: Optical alignment concerns visible ink edges rather than advance boxes. Signed departures distinguish overhang from inset. For a complementary task, use Ellipsis vs Three Periods Width Compare: An ellipsis and three periods can have different advances. Pair kerning contributes twice to the three-period sequence.

References

  1. Hanging Punctuation Offset em — tool.io

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies