Closed awardle closed 3 years ago
Noticed from reading the unit tests, a font configuation could be made as follows:
IScryberConfigurationService service = ServiceProvider.GetService<IScryberConfigurationService>();
service.FontOptions.Register = new[]
{
new FontRegistrationOption
{
Family = "Roboto",
File = "Fonts/Roboto-Regular.ttf"
}
};
Hi Alex
That's awesome you sorted. And works brilliantly! It is can also possible to reference a font from the css style in any document using the font-face selector (as of v5.0.4 package)
@font-face { font-family: Roboto; src: url(../Fonts/Roboto-Regular.ttf); }
Adding it, so it may help, or help someone else.
Is there a way to set the font options directly from code without using an "appsetting.json" file?
I need to reference some fonts that I have included in my project.