From 08facf0f7dbf92a4e38bcbc781568489f83c3da8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hendrik=20M=C3=B6lder?= Date: Thu, 25 Apr 2024 15:50:02 +0300 Subject: [PATCH 1/2] fix font fallbacks types --- .changeset/rare-moles-raise.md | 5 +++++ packages/types/font.d.ts | 2 +- packages/types/style.d.ts | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/rare-moles-raise.md diff --git a/.changeset/rare-moles-raise.md b/.changeset/rare-moles-raise.md new file mode 100644 index 000000000..b02b46941 --- /dev/null +++ b/.changeset/rare-moles-raise.md @@ -0,0 +1,5 @@ +--- +"@react-pdf/types": minor +--- + +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 From 1d37561895e69150f736fb2bc07c07099dd4bd0a Mon Sep 17 00:00:00 2001 From: Diego Muracciole Date: Sun, 22 Sep 2024 16:17:17 +0200 Subject: [PATCH 2/2] chore: update bump type --- .changeset/rare-moles-raise.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/rare-moles-raise.md b/.changeset/rare-moles-raise.md index b02b46941..3e9bfbd5f 100644 --- a/.changeset/rare-moles-raise.md +++ b/.changeset/rare-moles-raise.md @@ -1,5 +1,5 @@ --- -"@react-pdf/types": minor +"@react-pdf/types": patch --- accept string array for `fontFamily` in stylesheets