Reputation: 552
Basically, I have imported various custom font templates into my public/fonts
folder. Examples are Muli
, Muli-Bold
, Muli-ExtraBold
. My question now is, how do I call and use these fonts in my blade files?
Upvotes: 1
Views: 17277
Reputation: 82
If you want to add custom font in lavarel you can add it just like you do in HTML file . You can add in css as:
@font-face {
font-family: Muli-Bold; src: url('/fonts/Muli-Bold.tff');
}
Or you can include the above code in blade
using the style tag.
Upvotes: 2
Reputation: 1036
You can add custom fonts in laravel as like you add in an HTML template. You can add it in blade
like
<style type="text/css">
@font-face {
font-family: Muli-Bold;
src: url('{{ public_path('fonts/Muli-Bold.tff') }}');
}
</style>
And you can add it in any css
file as :
@font-face {
font-family: Muli-Bold;
src: url('/fonts/Muli-Bold.tff');
}
Upvotes: 4