Skip to content

Commit

Permalink
fix: font fallbacks types (#2727)
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrikmolder authored Sep 22, 2024
1 parent e42a79a commit 4bafab8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/rare-moles-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@react-pdf/types": patch
---

accept string array for `fontFamily` in stylesheets
2 changes: 1 addition & 1 deletion packages/types/font.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface FontDescriptor {

interface FontSource {
src: string;
fontFamily: string | string[];
fontFamily: string;
fontStyle: FontStyle;
fontWeight: number;
data: any;
Expand Down
2 changes: 1 addition & 1 deletion packages/types/style.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export interface Style {
// Text

fontSize?: number | string;
fontFamily?: string;
fontFamily?: string | string[];
fontStyle?: string | 'normal';
fontWeight?:
| number
Expand Down

0 comments on commit 4bafab8

Please sign in to comment.