Add lower-corner layouts, custom blur backgrounds, and classic blur fill.
Ship composition families, optional background images for lower-corner templates, and an optional blurred cover fill for classic letterbox.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
import type { WatermarkFontKey } from "./fonts";
|
||||
import { CURATED_FONTS } from "./fonts";
|
||||
import { CURATED_FONTS, SYSTEM_FONT } from "./fonts";
|
||||
|
||||
/** Matches LayoutStudio max preview width (tailwind max-w-xl ≈ 576px; use 576 for scaling). */
|
||||
export const PREVIEW_REFERENCE_WIDTH = 576;
|
||||
@@ -29,13 +29,13 @@ export function scaleFontToPreview(fontPx: number, encodeWidth: number): number
|
||||
|
||||
export function previewFontFamilyCss(fontKey: WatermarkFontKey | undefined): string {
|
||||
if (!fontKey || fontKey === "system") {
|
||||
return "Arial, Helvetica, sans-serif";
|
||||
return `'${SYSTEM_FONT.previewFamily}', sans-serif`;
|
||||
}
|
||||
if (fontKey === "custom") {
|
||||
return "'S2VIDCustomWm', Arial, sans-serif";
|
||||
return "'S2VIDCustomWm', sans-serif";
|
||||
}
|
||||
const meta = CURATED_FONTS.find((f) => f.key === fontKey);
|
||||
return meta ? `'S2VIDPreview-${meta.key}', Arial, sans-serif` : "Arial, sans-serif";
|
||||
return meta ? `'S2VIDPreview-${meta.key}', sans-serif` : "sans-serif";
|
||||
}
|
||||
|
||||
export function curatedFontApiUrl(key: string): string {
|
||||
|
||||
Reference in New Issue
Block a user