Type Definitions
Type Definitions
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
color |
PSPDFKit.Color | null | The Color represented by this preset. Eg: |
localization |
Localization |
On Standalone, this callback receives the name of a font to retrieve as an argument
and you can return from it a Promise
that resolves to a Blob
with the font data to
use.
See this guide to learn more.
Parameters:
Name | Type | Description |
---|---|---|
fontName |
string | The |
Example
Create a custom font for retrieving "Arial.ttf"
new PSPDFKit.Font({
name: "Arial.ttf",
callback: name => fetch(`https://example.com/${name}`).then(r => r.blob());
})
Type:
- "none" | "square" | "circle" | "diamond" | "openArrow" | "closedArrow" | "butt" | "reverseOpenArrow" | "reverseClosedArrow" | "slash"
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
id |
string | Eg: 'purple' |
|
defaultMessage |
string |
<nullable> |
Default Localization message. Eg: 'Purple' |
description |
string |
<nullable> |
Description of the localization message. Eg: 'Purple Color' |