fix: revert to default hyphenation method

This commit is contained in:
Amruth Pillai
2026-05-10 21:50:27 +02:00
parent 846b7856a7
commit 64ac3ff328
2 changed files with 0 additions and 4 deletions
@@ -44,7 +44,6 @@ describe("registerFonts", () => {
it("registers CJK PDF fallbacks for normal and italic text styles", async () => {
const registerSpy = vi.spyOn(Font, "register").mockImplementation(() => {});
vi.spyOn(Font, "registerHyphenationCallback").mockImplementation(() => {});
const cjkFallbackSource = getWebFontSource("Noto Serif SC", "400", false);
const { registerFonts } = await import("./use-register-fonts");
@@ -72,7 +71,6 @@ describe("registerFonts", () => {
it("uses the full CJK font source for synthetic italic variants when the CJK font is primary", async () => {
const registerSpy = vi.spyOn(Font, "register").mockImplementation(() => {});
vi.spyOn(Font, "registerHyphenationCallback").mockImplementation(() => {});
const cjkFallbackSource = getWebFontSource("Noto Serif SC", "400", false);
const { registerFonts } = await import("./use-register-fonts");
@@ -66,8 +66,6 @@ const resolvePdfTypography = (typography: Typography): Typography => {
};
export const registerFonts = (typography: Typography): PdfTypography => {
Font.registerHyphenationCallback((word) => [word]);
const pdfTypography = resolvePdfTypography(typography);
const bodyFontFamily = pdfTypography.body.fontFamily;
const headingFontFamily = pdfTypography.heading.fontFamily;