A line of words set along a path

Run one line of text round a seal, over an arch or along the edge of a map: every letter stands on the curve and leans the way it leans.

Summary

The words on a stamp, a seal or a coin go round the edge, and set as an ordinary line they would lie flat across the middle instead. Here you give the line and the shape it is to follow, and each letter is turned to stand on that shape. The letters are spaced along the curve's own length, so a bend that tightens never crowds them together, and you say where the line begins: at the start of the path, halfway along it — which keeps the words centred however long they turn out to be — or at the far end, so that the line stops where the path stops.

Technically

Asked for with "type": "text_path"

The path is the same run of segments a drawn path states, so one shape is written one way throughout a request: move_to puts the pen down, line_to and curve_to draw, and close shuts the current subpath. It states where it starts and starts once — a line follows one run of points, not several. The run is flattened and walked by length rather than by angle, which is what keeps the spacing even where the curvature changes; a line longer than the path runs off its far end rather than being squeezed onto it.

Request schema

Required keys: content, the line; font, the name of a declared font; font_size, in points; path, the segments, each one of move_to, line_to, curve_to and close. Optional: start, one of beginning (the default), middle and end; color, the colour the letters are drawn in, the colour in force by default; graphics_state, the name of a declared state; pages, an array of one-based integers, default empty; transform, six numbers; rotate, degrees counter-clockwise about the centre of the box the path falls in; layer, the name of a declared layer; tag with mark, or artifact. Cross refusal: transform together with rotate, and tag together with artifact.

A whole request that creates a PDF

{
  "standard_fonts": [{ "name": "sans", "face": "helvetica_bold" }],
  "items": [
    {
      "type": "text_path",
      "content": "CERTIFIED COPY",
      "font": "sans",
      "font_size": 16,
      "start": "middle",
      "color": [0.25, 0.35, 0.7],
      "path": [
        { "move_to": { "x": 196.5, "y": 620 } },
        {
          "curve_to": {
            "x1": 196.5, "y1": 675.78,
            "x2": 241.72, "y2": 721,
            "x": 297.5, "y": 721
          }
        },
        {
          "curve_to": {
            "x1": 353.28, "y1": 721,
            "x2": 398.5, "y2": 675.78,
            "x": 398.5, "y": 620
          }
        }
      ]
    }
  ]
}

The line that sends it, in three languages

Text

A block of text placed on the page Text in paragraphs, with indents and tab stops A stamp laid across the page Blocks laid one under the other, page after page

Where to go next

Every JSON key of a request, in one page The other twenty-two things you can draw

See the prices See the examples