Merge branch 'main' into B2B-88
This commit is contained in:
27
lib/fonts.ts
27
lib/fonts.ts
@@ -1,4 +1,5 @@
|
||||
import { Inter as SansFont } from 'next/font/google';
|
||||
import { Geist as HeadingFont } from 'next/font/google';
|
||||
import SansFont from 'next/font/local';
|
||||
|
||||
import { cn } from '@kit/ui/utils';
|
||||
|
||||
@@ -8,18 +9,32 @@ import { cn } from '@kit/ui/utils';
|
||||
* By default, it uses the Inter font from Google Fonts.
|
||||
*/
|
||||
const sans = SansFont({
|
||||
subsets: ['latin'],
|
||||
variable: '--font-sans',
|
||||
fallback: ['system-ui', 'Helvetica Neue', 'Helvetica', 'Arial'],
|
||||
preload: true,
|
||||
weight: ['300', '400', '500', '600', '700'],
|
||||
src: [
|
||||
{
|
||||
path: '../fonts/InterDisplay-Regular.woff2',
|
||||
weight: '400',
|
||||
style: 'normal',
|
||||
},
|
||||
{
|
||||
path: '../fonts/InterDisplay-Medium.woff2',
|
||||
weight: '500',
|
||||
style: 'medium',
|
||||
},
|
||||
],
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* @heading
|
||||
* @description Define here the heading font.
|
||||
*/
|
||||
const heading = sans;
|
||||
const heading = HeadingFont({
|
||||
variable: '--font-heading',
|
||||
fallback: ['system-ui', 'Helvetica Neue', 'Helvetica', 'Arial'],
|
||||
preload: true,
|
||||
weight: ['300', '400', '500', '600', '700'],
|
||||
});
|
||||
|
||||
// we export these fonts into the root layout
|
||||
export { sans, heading };
|
||||
|
||||
Reference in New Issue
Block a user