BlazorExtensions/Canvas

Is there any way to use custom fonts? such as AwesomeIcons

voland opened this issue · 2 comments

Is there any way to use custom fonts? such as Awesome-icons to paste them in specific color.

using:
await _outputCanvasContext.SetFontAsync("Font Awesome 5 Free");

just doesn't work, in razor file which contains BECanvas font awesome is recognised, and pasting icons is possible.

Sorry i have to answer my question.
I forgot to add apostrophe around name of font, like this
await _outputCanvasContext.SetFontAsync(" 'Font Awesome 5 Free' ");

What confused me was that i had not to use apostrophe using Courier New font, and I don't know why.

Maybe because common string would consider font family, while apostrophe for font file?