I use C# WPF and Stimulsoft
I want to send path my font file was embedded to my report when need to show
I have embedded font in my WPF Project and I use it like this :
in XAML :
<Label x:Name="preloader" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Content="Loading . . ." Margin="319,178,48,34" FontFamily="/WpfApp5;component/FNT/#B Titr" FontSize="48" Background="White"/>
The font was embed from font's folder in my project :
for my report was generated in stimulsoft I cannot embed font but I can send it a path of my font enter link description here
by this I can send it my font path :
for that I tried two way
C# Code :
1- :
StiFontCollection.AddFontFile(@"pack://application:,,,/FNT/#B Titr");
this case will show this error :
System.NotSupportedException: 'The given path's format is not supported.'
2- :
var fntpath = Assembly.GetEntryAssembly().GetManifestResourceStream("WpfApp5.FNT.BTITRBD.TTF");
StiFontCollection.AddFontFile(fntpath.ToString());
and in this fntpath.ToString() is null !
How to do this ?
Please help