Page 1 of 1

How can I use a font not installed on the PC?

Posted: Fri Apr 30, 2021 11:46 am
by Energetic
Hello,
Is it possible to use a font for the axis title and labels, which is not installed on the computer but supplied with the application as .ttf file? It is included as a resource in a WPF application. In a resource dictionary I can use it without problems for TextBoxes in the application but the charts are not accepting it. Could you please tell me how I can use it?

I tried:
Dim font = New WpfFont(13)
font.Family = DirectCast(Application.Current.FindResource("MarvelFontFamily"), FontFamily)
yAxis.LabelsFont = font

or alternatively loading the font into a PrivateFontCollection and then using the Syste.Drawing.FontFamily:
font = New WpfFont(FontCollection.Families(0), 12, FontStyle.Regular)

but none of those resultated in a change of the labels font.

Re: How can I use a font not installed on the PC?

Posted: Fri Apr 30, 2021 1:36 pm
by ArctionKestutis
We have such feature request in our wish-list, but currently it is not possible to use custom font from the resources (for charting). The workaround is to install font in the system folder and use family name string in constructor.

Re: How can I use a font not installed on the PC?

Posted: Fri Apr 30, 2021 2:14 pm
by Energetic
Ok, Thank you for the quick response