Skip to content

Main content

Letter Spacing Em Pixel Crosswalk Tool

Caller-selected inter-character versus trailing-spacing convention; this does not model font shaping or kerning.

Loading tool…

Description

Multiply signed spacingEm by nonnegative fontPixels for spacingPixels.

Typography combines several distinct scales: font size describes an em scale, cap height describes a font metric, leading describes baseline spacing, and variable-font axes select design coordinates. Ratios between them require an explicit convention.

Multiply signed spacingEm by nonnegative fontPixels for spacingPixels.

When to use this tool

Use Letter Spacing Em Pixel Crosswalk when you need to compare supplied type metrics or font-axis values on a consistent basis.

How to use the tool and how it works

  1. Enter spacingEm, fontPixels, characterCount, includeTrailing. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read spacingPixels, gaps, addedWidthPixels. Use the output convention below.

Multiply signed spacingEm by nonnegative fontPixels for spacingPixels. Count max(0, characterCount-1) gaps, or characterCount when includeTrailing, and multiply for addedWidthPixels.1

Input fieldMeaning and unitsAccepted input
spacingEmSpacing EmRequired. Finite number.
fontPixelsFont PixelsRequired. Finite number; minimum 0.
characterCountCharacter CountRequired. Safe integer; minimum 0.
includeTrailingInclude TrailingRequired. Boolean.
Output fieldInterpretationReturned shape
spacingPixelsSpacing PixelsRequired. Finite number.
gapsGapsRequired. Safe integer.
addedWidthPixelsAdded Width PixelsRequired. Finite number.
json
{
  "input": {
    "spacingEm": 0.05,
    "fontPixels": 20,
    "characterCount": 10,
    "includeTrailing": false
  },
  "output": {
    "spacingPixels": 1,
    "gaps": 9,
    "addedWidthPixels": 9
  }
}

Limitations and assumptions

  • CharacterCount is supplied rather than Unicode or glyph analysis; shaping, kerning, ligatures, bidi layout, and renderer-specific tracking behavior are not modeled.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Read actual font metrics and variation tables when available, then proof the text in its intended renderer. A metric calculation cannot replace shaping, glyph inspection, or an actual layout test.

References

  1. Calculation and input contract: graphic-design/letter-spacing-em-pixel-crosswalk — tool.io

Similar or alternative tools