diff --git a/src/index.ts b/src/index.ts index 9952fe6..319dec7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,7 +2,7 @@ import type { InitializedProvider, Provider, ResolveFontOptions, ResolveFontResu import { createAsyncStorage, memoryStorage, type Storage } from './cache' export * as providers from './providers' -export type { FontFaceData, LocalFontSource, Provider, ProviderContext, ProviderDefinition, ProviderFactory, RemoteFontSource, ResolveFontOptions } from './types' +export type { FontFaceData, FontStyles, LocalFontSource, Provider, ProviderContext, ProviderDefinition, ProviderFactory, RemoteFontSource, ResolveFontOptions } from './types' export { defineFontProvider } from './utils' export interface UnifontOptions { diff --git a/src/types.ts b/src/types.ts index 4237c43..ebcc8a3 100644 --- a/src/types.ts +++ b/src/types.ts @@ -10,9 +10,11 @@ export interface ProviderContext { } } +export type FontStyles = 'normal' | 'italic' | 'oblique' + export interface ResolveFontOptions { weights: string[] - styles: Array<'normal' | 'italic' | 'oblique'> + styles: FontStyles[] // TODO: improve support and support unicode range subsets: string[] fallbacks?: string[]