fix(cjk): resolve hyphenation callback with cjk content in resume

This commit is contained in:
Amruth Pillai
2026-05-11 22:04:45 +02:00
parent 0a8fe05653
commit 62b0a1d533
27 changed files with 486 additions and 525 deletions
+1 -4
View File
@@ -1,3 +1,4 @@
import { unique } from "@reactive-resume/utils/field";
import webFontListJSON from "./webfontlist.json";
export type FontCategory = "display" | "handwriting" | "monospace" | "serif" | "sans-serif";
@@ -105,10 +106,6 @@ export const standardFontList = standardPdfFontList.filter((font) => !webFontMap
const fontMap = new Map<string, FontRecord>();
const chinesePrioritySet = new Set<string>(preferredChineseFontFamilies);
function unique<T>(items: T[]) {
return items.filter((item, index) => items.indexOf(item) === index);
}
function orderFonts(fonts: FontRecord[]) {
return [...fonts].sort((a, b) => {
return a.family.localeCompare(b.family, undefined, { sensitivity: "base" });