Skip to content

Commit

Permalink
feat(types): export the FontStyles type (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
barelyhuman authored Oct 6, 2024
1 parent 480dcef commit 6440670
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 3 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[]
Expand Down

0 comments on commit 6440670

Please sign in to comment.