mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-23 08:23:33 +10:00
fix(docs): update healthcheck test script on docs, resolves #3027
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import type { FontWeight } from "@reactive-resume/fonts";
|
||||
import type { Typography } from "@reactive-resume/schema/resume/data";
|
||||
import { Font } from "@react-pdf/renderer";
|
||||
import { all as cjk } from "cjk-regex";
|
||||
import {
|
||||
getFont,
|
||||
getPdfCjkFallbackFontFamily,
|
||||
@@ -66,7 +67,7 @@ const resolvePdfTypography = (typography: Typography): Typography => {
|
||||
|
||||
export const registerFonts = (typography: Typography): PdfTypography => {
|
||||
Font.registerHyphenationCallback((word) => {
|
||||
if (word.match(/\p{Script=Han}/u)) return word.split("").flatMap((l) => [l, ""]);
|
||||
if (cjk().toRegExp().test(word)) return word.split("").flatMap((l) => [l, ""]);
|
||||
return [word];
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user