Skip to content

Commit

Permalink
🤖 Merge PR DefinitelyTyped#60101 add missing definition for pdfkit fo…
Browse files Browse the repository at this point in the history
…nt function by @jbdemonte

Co-authored-by: Jean-Baptiste Demonte <[email protected]>
  • Loading branch information
jbdemonte and Jean-Baptiste Demonte authored Apr 28, 2022
1 parent 44fdc86 commit 702534d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions types/pdfkit/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ declare namespace PDFKit.Mixins {

interface PDFFont {
font(buffer: Buffer): this;
font(src: string, size?: number): this;
font(src: string, family?: string, size?: number): this;
fontSize(size: number): this;
currentLineHeight(includeGap?: boolean): number;
Expand Down
2 changes: 2 additions & 0 deletions types/pdfkit/pdfkit-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ doc.translate(280, 0)

doc.circle(100, 100, 100).clip();

doc.font('Arial', 30).text('The size is 30');

doc.fontSize(25)
.fillColor('blue')
.text('This is a link!', 20, 0);
Expand Down

0 comments on commit 702534d

Please sign in to comment.