# tools.sign

Part of [Tools](https://kernstra.com/docs/web-sdk/config/tools) in the Kernstra Web SDK 1.0.0 configuration reference.

- Type: `boolean | SignatureConfig`
- Default: `on, within the mode`
- Page: https://kernstra.com/docs/web-sdk/config/tools/sign

Signature tool. Needs the `annotations` license feature (signing a form's signature field needs `forms`). Sign is also offered in `'form-fill'` mode, for your own button. The same dialog opens from the Sign tool and from a form's signature fields, so `tools.sign` shapes both. `true` is the same as `{}`: every tab, the built-in faces. With one tab left the dialog shows no tab strip. With every tab off there is no way to make a signature: the Sign tool is hidden and signature fields are read-only. `tools.sign: false` only hides the tool — form signature fields still open the full dialog.

A signature made in a form's signature field is saved as that field's appearance, cropped to its ink so it fills the field: every reader shows it in the field and prints it, the export's [`flatten`](https://kernstra.com/docs/web-sdk/config/export/flatten) locks it into the page with the other fields, and the field stays a signature field. It is an electronic signature, not a digital one — nothing is written as the field's signature value, so the file claims no digital signature, and a digital ID applied later in another application replaces the picture. The SDK never draws over a field that holds a digital signature, nor into a read-only or hidden one. A field that already shows a signature (saved by the SDK or another application) shows it as the page draws it, without the "Sign here" prompt, and can be signed again; one that holds a digital signature cannot (`FormFieldInfo.signature`). To replace the dialog entirely, see [`callbacks.onSignatureRequest`](https://kernstra.com/docs/web-sdk/config/callbacks/onsignaturerequest).

```ts
import { SIGNATURE_FONTS } from '@kernstra/pdf-web-sdk';

tools: {
  sign: {
    upload: false,
    fonts: [...SIGNATURE_FONTS, { family: "'Acme Script', cursive", label: 'Acme' }],
  },
}
```

### `sign.draw`

- Type: `boolean`
- Default: `true`
- Page: https://kernstra.com/docs/web-sdk/config/tools/sign-draw

Offer the Draw tab.

### `sign.type`

- Type: `boolean`
- Default: `true`
- Page: https://kernstra.com/docs/web-sdk/config/tools/sign-type

Offer the Type tab.

### `sign.upload`

- Type: `boolean`
- Default: `true`
- Page: https://kernstra.com/docs/web-sdk/config/tools/sign-upload

Offer the Upload tab.

### `sign.fonts`

- Type: `readonly SignatureFont[]`
- Default: `SIGNATURE_FONTS`
- Page: https://kernstra.com/docs/web-sdk/config/tools/sign-fonts

Faces the Type tab offers. Each `SignatureFont` is `{ family, label }`: `family` a CSS font-family value — load the face yourself (`@font-face`) — and `label` the name shown beside the preview. `fonts` replaces the Type tab's faces, in order; an empty list keeps the default. The built-in faces' names ("Standard", "Script", …) follow the viewer's language when you pass the `SIGNATURE_FONTS` objects themselves — spread the constant; a face you describe yourself shows the `label` you gave it.

### `sign.inks`

- Type: `ColorList`
- Default: `black, navy, blue, red`
- Page: https://kernstra.com/docs/web-sdk/config/tools/sign-inks

Inks a signature can be written in, first ink selected. A `ColorList` is a list of hex strings or `{ color, label }` color options (see [Annotations](https://kernstra.com/docs/web-sdk/config/annotations)).

### `sign.savedSignatures`

- Type: `readonly SavedSignature[]`
- Page: https://kernstra.com/docs/web-sdk/config/tools/sign-savedsignatures

Signatures to offer for reuse, restored. The dialog keeps up to three signatures the user chose to save; they last for the session unless you keep them — store what the [`savedSignaturesChanged`](https://kernstra.com/docs/web-sdk/api/events#ev-savedsignatureschanged) event gives you and pass it back here. The list is shared by every viewer on the page. See [What you can replace](https://kernstra.com/docs/web-sdk/guides/replace).

### `sign.webFonts`

- Type: `boolean`
- Default: `false`
- Page: https://kernstra.com/docs/web-sdk/config/tools/sign-webfonts

Fetch the Type tab's script faces from Google Fonts. Beside its plain Standard face, the Type tab offers four script faces (Dancing Script, Great Vibes, Pacifico, Sacramento). By default they are **not** fetched: each renders in a handwriting face the operating system ships (Snell Roundhand, Apple Chancery, Marker Felt and Savoye on a Mac; Segoe Script, Lucida Handwriting, Segoe Print and Lucida Calligraphy on Windows, or Office's Edwardian Script and Monotype Corsiva where they are installed), and the dialog makes no network request, which keeps the SDK's no-Google-Fonts guarantee intact. Set it where a request to Google is acceptable to you and your users, and add `https://fonts.googleapis.com` to `style-src` and `https://fonts.gstatic.com` to `font-src`. Either way the dialog never waits on the font host; faces that have not arrived by the time a signature is placed fall back to the system face for that signature.

It is read from `tools.sign` as an object: with `tools.sign: false` the faces stay off for a form's signature fields too. To hide the tool and keep them, leave `tools.sign` on and drop the tool from [`toolbar.groups`](https://kernstra.com/docs/web-sdk/config/toolbar/groups).

```ts
tools: { sign: { webFonts: true } }
```

Web page: https://kernstra.com/docs/web-sdk/config/tools/sign
