Skip to content

Main content

Glyph Fallback Metric Delta Table

Compare paired supplied primary/fallback glyph advances and total run shift; caller must establish glyph correspondence, no shaping equivalence.

Loading tool…

Description

Compare paired supplied primary/fallback glyph advances and total run shift; caller must establish glyph correspondence, no shaping equivalence.

A glyph’s advance moves the next placement origin; its ink box describes visible bounds relative to that origin. Ink can overhang the advance, and an unknown box differs from a known empty box. These tools use caller-supplied glyph IDs and metrics, placing a horizontal run by cumulative advances without shaping text.

Compare paired supplied primary/fallback glyph advances and total run shift; caller must establish glyph correspondence, no shaping equivalence.

When to use this tool

Use this tool to compare paired supplied primary/fallback glyph advances and total run shift; caller must establish glyph correspondence, no shaping equivalence.

How to use the tool and how it works

  1. Enter primary, fallback using the input definitions below.
  2. Run the operation. Resolve malformed-input errors before interpreting the result.
  3. Read result.deltas, result.totalDelta. Interpret signs, units, ordering and null values using the rules below.

Require aligned primary/fallback lists. For each index return fallback advance minus primary advance; totalDelta is the sum of fallback advances minus the sum of primary advances.1

Input fieldMeaning and unitsAccepted input
primaryPrimary advances aligned by glyph correspondence with fallback.Dense list of at most 128 finite numbers, subject to the stated integer/shape rules.
fallbackFallback advances in the same units and order as primary.Dense list of at most 128 finite numbers, subject to the stated integer/shape rules.
Output fieldInterpretation
resultObject containing the fields below.
result.deltasFallback minus primary advance at each aligned input index.
result.totalDeltaFallback run advance minus primary run advance.
json
{
  "input": {
    "primary": [
      4,
      5
    ],
    "fallback": [
      5,
      3
    ]
  },
  "output": {
    "result": {
      "deltas": [
        1,
        -2
      ],
      "totalDelta": -1
    }
  }
}

Limitations and assumptions

  • The caller must establish correspondence and common units; equal run length does not establish equivalent glyph shaping.
  • All advances, box coordinates, shifts and positional tolerances must share caller-defined metric units. Signed advances are accepted. Glyph records contain id, advance, integer cluster 0–8192 and box = null or [minX,minY,maxX,maxY] with ordered bounds.
  • Every declared top-level input is required and unknown fields are rejected. Ordinary strings are limited to 8,192 UTF-16 code units and lists to 128 entries, with tighter operation-specific bounds where stated. JSON text has bounded nesting and node counts.
  • Numeric outputs must be finite and within the absolute safe-integer magnitude; exact larger integers use decimal text. Source positions are zero-based UTF-16 offsets and span ends are exclusive unless a different convention is explicitly stated.

Alternative or Complementary methods

Obtain metrics and cluster mappings from the intended font/shaping system, then inspect the supplied observations. Use actual rendering when hinting, fallback choice or visible pixel extents matter.

References

  1. Tool behavior and example: Glyph Fallback Metric Delta Table — tool.io

Similar or alternative tools

  • Glyph Advance Run Tab Stop Placement

    Place glyph-run tab positions at the next strictly greater explicit stop, then repeat a supplied positive interval after the last stop; no text shaping.

  • Glyph Advance Scale Transform

    Scale explicit glyph advances and known box coordinates by a nonnegative uniform factor; no hinted rasterization or font metric inference.