mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-08-24 23:32:19 +10:00
fix(cjk): resolve hyphenation callback with cjk content in resume
This commit is contained in:
@@ -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" });
|
||||
|
||||
Reference in New Issue
Block a user