chore: move getPretextFontString into separate directory

This commit is contained in:
Ilia Mashkov
2026-05-23 20:03:13 +03:00
parent f3c4e72b86
commit 95ae72719e
3 changed files with 1 additions and 1 deletions
@@ -0,0 +1,11 @@
/**
* Formats a font configuration into a string format required by @chenglou/pretext.
*
* @param weight - Numeric font weight (e.g., 400).
* @param sizePx - Font size in pixels.
* @param fontName - The font family name.
* @returns A formatted font string: `"weight sizepx \"fontName\""`.
*/
export function getPretextFontString(weight: number, sizePx: number, fontName: string): string {
return `${weight} ${sizePx}px "${fontName}"`;
}