Importing self hosted custom font in Tailwind

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
@font-face {
font-family: "avenir";
src: url('/public/fonts/AvenirLTStd-Black.otf') format('OpenType');
}

@font-face {
font-family: "prisma";
src: url('/public/fonts/Prisma.ttf') format('TrueType');
}
}
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
@font-face {
font-family: "avenir";
src: url('/public/fonts/AvenirLTStd-Black.otf') format('OpenType');
}

@font-face {
font-family: "prisma";
src: url('/public/fonts/Prisma.ttf') format('TrueType');
}
}
i'm trying to import the self hosted custom font, not able to access in the html. i'm using vite. what am i doing wrong here?
2 Replies
MarkBoots
MarkBoots2y ago
do you see the fonts in the compiled stylesheet?
Abdul Ahad⚡
Abdul Ahad⚡OP2y ago
no, i don't see any in the style sheet
Want results from more Discord servers?
Add your server