@nuxtjs/fontaine
Version:
[![npm version][npm-version-src]][npm-version-href] [![npm downloads][npm-downloads-src]][npm-downloads-href] [![Github Actions][github-actions-src]][github-actions-href] [![Codecov][codecov-src]][codecov-href]
30 lines (27 loc) • 1.35 kB
text/typescript
import * as _nuxt_schema from '@nuxt/schema';
interface CustomFont {
/** The font family name. This will be used to generate the fallback name and also to load cached metrics, if possible. */
family: string;
/** A file or web URL to inspect for font metrics. */
src?: string;
/** If you want to customise the overridden name. In most cases it should not be overridden. */
fallbackName?: string;
/** If you want to customise the fallbacks on a per-font basis. */
fallbacks?: string[];
/** If you want to customise font directory. Default is Nuxt public directory. */
root?: string;
}
interface ModuleOptions {
/** Set to `false` to disable automatic injection of fallbacks. */
inject: boolean;
/** Set to `false` to disable inlining of font-face rules. */
inline: boolean;
/** An array of local fonts to display as a fallback. */
fallbacks: string[];
/** Fonts to generate fallback declarations for. This is only necessary if you do not have `@font-face` declarations for them in your CSS. */
fonts: Array<string | CustomFont>;
/** If you want to customise directory for all fonts. Default is Nuxt public directory. */
root?: string;
}
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
export { type ModuleOptions, _default as default };