0

I want to call .ttf file instead of .woff2 file in typography.less. But, it's not call and return 404 error.

Code :

.lib-font-face(
        @family-name: @roboregular,
        @font-path: '@{baseDir}fonts/robo-regular-webfont',
        @font-weight: normal,
        @font-style: normal,
        @font-display: swap
    );

How to call it?

Please help me.

Thanks.

1
  • 2
    Why don't you simply create .woff & .woff2 extension using the online tools. Jul 25, 2020 at 14:42

1 Answer 1

0

Please try below

@font-face {
    font-family: 'roboregular';
    src:  url('../fonts/Akkurat-Bold.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

You can change the font path according to your directory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.