How to Load Custom Fonts in RazorLight Templates #544
Unanswered
skalahonza
asked this question in
Q&A
Replies: 2 comments 1 reply
|
I am not an expert here, but what does a template engine have to do with custom fonts or fonts in general? The template engine is only responsible for building the document. It has nothing to do with document rendering. It's not like you are merging the font files right into the document text, right? Your font files exist in some location, so the document should reference them in a way that a rendering engine knew where to get them. But again, unless I am missing something, this is not the question to be addressed by a templating engine. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Uh oh!
There was an error while loading. Please reload this page.
Hi everyone,
I am using RazorLight for template rendering in my .NET project, and I need to load custom fonts within my RazorLight templates. Here are the steps I've taken so far:
Added Custom Fonts:
.woff,.woff2) in thewwwroot/fontsdirectory of my project.Defined Fonts in CSS:
Is there any better practice to do this?
I searched the discussion with no luck: https://github.com/toddams/RazorLight/discussions?discussions_q=font
All reactions