Skip to content

Main content

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.

Loading tool…

Description

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.

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.

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.

When to use this tool

Use this tool to 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.

How to use the tool and how it works

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

Require strictly increasing explicit tab stops and a positive repeat interval. For each position choose the first stop strictly greater than it; after the final stop, use origin + (floor((position−origin)/interval)+1)×interval, with origin the final stop or zero.1

Input fieldMeaning and unitsAccepted input
positionsCurrent horizontal positions to advance to tab stops, in common metric units.Dense list of at most 128 finite numbers, subject to the stated integer/shape rules.
tabStopsStrictly increasing explicit stop coordinates; may be empty.Dense list of at most 128 finite numbers, subject to the stated integer/shape rules.
intervalPositive repeat distance after the final explicit stop, or after origin zero if no stops exist.Finite number satisfying the stated comparisons.
Output fieldInterpretation
resultObject containing the fields below.
result.positionsNext tab-stop coordinate for every supplied position.
json
{
  "input": {
    "positions": [
      0,
      4,
      10
    ],
    "tabStops": [
      4,
      8
    ],
    "interval": 4
  },
  "output": {
    "result": {
      "positions": [
        4,
        8,
        12
      ]
    }
  }
}

Limitations and assumptions

  • Positions already on a stop advance to the next one. Tabs are placed geometrically without text measurement or font 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 Advance Run Tab Stop Placement — tool.io

Similar or alternative tools

  • Glyph Advance Scale Transform

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

  • Glyph Box Run Extents

    Union explicitly supplied glyph ink boxes placed by accumulated horizontal advances; missing boxes contribute no invented ink, no font shaping.