Embedded Bookman Old Style TTF
X-Lovable-Edit-ID: edt-db8536c0-0d1b-4e84-b40b-86cdec6fa109 Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1,5 +1,6 @@
|
||||
import jsPDF from "jspdf";
|
||||
import type { PleadingInput } from "./docx-pleading";
|
||||
import { BOOKMAN_FAMILY, registerBookmanFont } from "./bookman-fonts";
|
||||
|
||||
// Letter @ 72dpi: 612 x 792. 1" margins = 72.
|
||||
const PAGE_W = 612;
|
||||
@@ -24,7 +25,7 @@ function setFont(pdf: jsPDF, style: Style, size = FONT_SIZE) {
|
||||
if (style.bold && style.italic) weight = "bolditalic";
|
||||
else if (style.bold) weight = "bold";
|
||||
else if (style.italic) weight = "italic";
|
||||
pdf.setFont("times", weight);
|
||||
pdf.setFont(BOOKMAN_FAMILY, weight);
|
||||
pdf.setFontSize(size);
|
||||
}
|
||||
|
||||
@@ -173,6 +174,7 @@ function drawFooter(pdf: jsPDF, page: number, totalPages: number, left?: string,
|
||||
|
||||
export async function downloadPleadingPdf(input: PleadingInput, filename: string) {
|
||||
const pdf = new jsPDF({ unit: "pt", format: "letter" });
|
||||
registerBookmanFont(pdf);
|
||||
|
||||
let y = MARGIN;
|
||||
const bottomLimit = PAGE_H - MARGIN;
|
||||
|
||||
Reference in New Issue
Block a user