API / geotoolkit / util / fontloader
Functions
Functions
▸ loadFont(location, family): Promise<void>
load font into browser
Example
// Usage of URL with base64
import {loadFont} from '@int/geotoolkit/util/fontloader';
loadFont('url(data:application/x-font-woff;base64,d09GRg...BQAAAAB)', 'fontawesome-webfont').then(() => {...});| Name | Type | Description |
|---|---|---|
location | string | ArrayBuffer | font location |
family | string | font family, must match to file name |
Promise<void>