diff --git a/.changeset/rare-moles-raise.md b/.changeset/rare-moles-raise.md new file mode 100644 index 000000000..3e9bfbd5f --- /dev/null +++ b/.changeset/rare-moles-raise.md @@ -0,0 +1,5 @@ +--- +"@react-pdf/types": patch +--- + +accept string array for `fontFamily` in stylesheets diff --git a/packages/types/font.d.ts b/packages/types/font.d.ts index 3e6b03731..e04d1ccb8 100644 --- a/packages/types/font.d.ts +++ b/packages/types/font.d.ts @@ -20,7 +20,7 @@ export interface FontDescriptor { interface FontSource { src: string; - fontFamily: string | string[]; + fontFamily: string; fontStyle: FontStyle; fontWeight: number; data: any; diff --git a/packages/types/style.d.ts b/packages/types/style.d.ts index 167feabdf..0d57f03ec 100644 --- a/packages/types/style.d.ts +++ b/packages/types/style.d.ts @@ -64,7 +64,7 @@ export interface Style { // Text fontSize?: number | string; - fontFamily?: string; + fontFamily?: string | string[]; fontStyle?: string | 'normal'; fontWeight?: | number