Skip to content
HALOWERK

Bildwerk

i18n overflow

Lays out every string with fontkit (advance widths and GPOS/kern kerning) in Liberation Sans Regular or Bold (OFL, metric-compatible with Arial) or your own font, adds letter spacing per character, wraps at spaces like CSS white-space: normal with overflow-wrap: normal (a word wider than the container overflows) and compares with max_width and max_lines. Pseudo-localisation accents Latin letters and pads the string to the expected translated length from the IBM expansion table published in.

POST https://bild.halowerk.com/v1/i18n-overflow

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
stringsarrayYes
pseudo_expansionSee schemaNo
pseudo_accentsbooleanNo
pseudo_bracketsbooleanNo
font_base64stringNoThe optional own font (TTF, OTF, WOFF, WOFF2); default Liberation Sans as base64 or data: URL. Give either font_base64 or font_url.
font_urlstringNoPublic http(s) URL of the optional own font (TTF, OTF, WOFF, WOFF2); default Liberation Sans, fetched once (at most 10 MB). Private and local addresses are refused.
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "strings"
  ],
  "properties": {
    "strings": {
      "type": "array",
      "minItems": 1,
      "maxItems": 500,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "text",
          "max_width"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "max_width": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 10000,
            "description": "Container width in CSS px."
          },
          "max_lines": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20,
            "default": 1
          },
          "font_size": {
            "type": "number",
            "minimum": 4,
            "maximum": 200,
            "default": 16
          },
          "bold": {
            "type": "boolean",
            "default": false
          },
          "letter_spacing": {
            "type": "number",
            "minimum": -5,
            "maximum": 50,
            "default": 0
          },
          "translations": {
            "type": "object",
            "maxProperties": 50,
            "propertyNames": {
              "pattern": "^[A-Za-z]{2,3}([_-][A-Za-z0-9]{2,8})*$"
            },
            "additionalProperties": {
              "type": "string",
              "maxLength": 4000
            },
            "description": "Optional translations keyed by language code."
          }
        }
      }
    },
    "pseudo_expansion": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "w3c-ibm-max",
            "w3c-ibm-min",
            "none"
          ]
        },
        {
          "type": "number",
          "minimum": 1,
          "maximum": 4
        }
      ],
      "default": "w3c-ibm-max"
    },
    "pseudo_accents": {
      "type": "boolean",
      "default": true
    },
    "pseudo_brackets": {
      "type": "boolean",
      "default": true
    },
    "font_base64": {
      "type": "string",
      "minLength": 16,
      "maxLength": 14000000,
      "description": "The optional own font (TTF, OTF, WOFF, WOFF2); default Liberation Sans as base64 or data: URL. Give either font_base64 or font_url."
    },
    "font_url": {
      "type": "string",
      "format": "uri",
      "maxLength": 2048,
      "description": "Public http(s) URL of the optional own font (TTF, OTF, WOFF, WOFF2); default Liberation Sans, fetched once (at most 10 MB). Private and local addresses are refused."
    }
  }
}

Open original schema

Published input example

{
  "strings": [
    {
      "id": "btn.save",
      "text": "Save changes",
      "max_width": 120,
      "max_lines": 1,
      "font_size": 14,
      "bold": true,
      "translations": {
        "de": "Änderungen speichern",
        "fr": "Enregistrer les modifications"
      }
    }
  ]
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub →