update at 2026-02-07 14:16:46

This commit is contained in:
douboer
2026-02-07 14:16:46 +08:00
parent dcaac46f65
commit 50c20700c0
6 changed files with 27 additions and 265 deletions

View File

@@ -1,23 +0,0 @@
import type { FontInfo, FontListItem } from '../types/font'
/**
* 将 fonts.json 项转换为 FontInfo 运行时结构。
*/
export function toFontInfo(item: FontListItem): FontInfo {
return {
id: item.id,
name: item.name,
path: item.path,
category: item.category,
isFavorite: false,
loaded: false,
progress: 0,
}
}
/**
* 批量转换字体清单。
*/
export function toFontInfoList(items: FontListItem[]): FontInfo[] {
return items.map(toFontInfo)
}