Initial commit

This commit is contained in:
2025-08-03 18:48:24 +02:00
parent 49bb62fc4e
commit 62ebe48adb
14 changed files with 1262 additions and 1092 deletions

View File

@@ -95,26 +95,16 @@ const PerformanceOptimizedFontCard = forwardRef(({
const getFontStyle = useCallback((name) => {
const baseStyle = { wordBreak: "break-word", lineHeight: "1.3", willChange: "auto" };
const fontMap = {
Montserrat: { fontFamily: "Montserrat, sans-serif", fontWeight: "500" },
'Bebas Neue': { fontFamily: '"Bebas Neue", cursive', fontWeight: "400", textTransform: "uppercase", letterSpacing: "0.05em" },
Oswald: { fontFamily: "Oswald, sans-serif", fontWeight: "500", textTransform: "uppercase" },
Raleway: { fontFamily: "Raleway, sans-serif", fontWeight: "400" },
Poppins: { fontFamily: "Poppins, sans-serif", fontWeight: "500" },
Inter: { fontFamily: "Inter, sans-serif", fontWeight: "400" },
Caveat: { fontFamily: "Caveat, cursive", fontWeight: "400" },
Pacifico: { fontFamily: "Pacifico, cursive", fontWeight: "400" },
'Dancing Script': { fontFamily: '"Dancing Script", cursive', fontWeight: "400" },
'Amatic SC': { fontFamily: '"Amatic SC", cursive', fontWeight: "400" },
Anton: { fontFamily: "Anton, sans-serif", fontWeight: "400", textTransform: "uppercase" },
'Luckiest Guy': { fontFamily: '"Luckiest Guy", cursive', fontWeight: "400", textTransform: "uppercase" },
'Fredoka One': { fontFamily: '"Fredoka One", cursive', fontWeight: "400" },
Bangers: { fontFamily: "Bangers, cursive", fontWeight: "400", textTransform: "uppercase" },
Orbitron: { fontFamily: "Orbitron, sans-serif", fontWeight: "400" },
'Press Start 2P': { fontFamily: '"Press Start 2P", cursive', fontWeight: "400", fontSize: "0.85em" },
'Playfair Display': { fontFamily: '"Playfair Display", serif', fontWeight: "400" }
};
return { ...baseStyle, ...(fontMap[name] || {}) };
const fontEntry = fontTransforms[name];
if (!fontEntry) return baseStyle;
const style = { ...baseStyle };
if (fontEntry.fontFamily) style.fontFamily = fontEntry.fontFamily;
if (fontEntry.fontWeight) style.fontWeight = fontEntry.fontWeight;
if (fontEntry.textTransform) style.textTransform = fontEntry.textTransform;
if (fontEntry.letterSpacing) style.letterSpacing = fontEntry.letterSpacing;
if (fontEntry.fontSize) style.fontSize = fontEntry.fontSize;
return style;
}, []);
const previewText = sStr(transformedText) || "Hallo Instagram!";
@@ -185,7 +175,7 @@ const PerformanceOptimizedFontCard = forwardRef(({
{copied ? (
<><Check className="w-4 h-4 mr-2" /> Copy! </>
) : (
<><Copy className="w-4 h-4 mr-2" /> Copy! </>
<><Copy className="w-4 h-4 mr-2" /> Start Typing </>
)}
</Button>
</div>