I use C# WPF and Stimulsoft
I want to send path my font file was embedded to my report when need to show
Please Check out this link to help me
thanks all
more detail : how-to-add-font-file-to-stimulsoft-report-from-embedded-font-in-c-sharp-wpf
I use C# WPF and Stimulsoft
I want to send path my font file was embedded to my report when need to show
Please Check out this link to help me
thanks all
more detail : how-to-add-font-file-to-stimulsoft-report-from-embedded-font-in-c-sharp-wpf
As Paul-5034 said, you could set Build Action property of BTITRBD.TTF to Resource. And you can try the following code if it is useful to you. You could also try to refer here.

The code of xaml:
<StackPanel Name="sp">
<TextBlock Text="Loading..." FontSize="30" />
<TextBlock Text="Loading..." FontSize="30" FontFamily="./FNT/#Al Qalam Quran Majeed Web Regular"/>
<TextBlock Text="Loading..." FontSize="30" FontFamily="./FNT/#Amiri Regular"/>
<TextBlock Name="tb" Text="Loading...." FontSize="30"/>
</StackPanel>
The code of xaml.cs:
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
tb.FontFamily = new FontFamily(new Uri("pack://application:,,,/"), "./FNT/#Amiri Regular");
}
}
The picture of result:
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Is your issue not that you're using the "font name" rather than the "file name" here?:
StiFontCollection.AddFontFile(@"pack://application:,,,/FNT/#B Titr");
If you try this does it work?
StiFontCollection.AddFontFile(@"pack://application:,,,/FNT/BTITRBD.TTF");
If BTITRBD.TTF has it's Build Action set to "Resource" and not "Embedded Resource" I'd expect this to work.
Just for your info GetManifestResourceStream is used to get Embedded Resources by their resource name. That method returns a stream to the Embedded Resource's data that you can read from.
also I found this but I don't know how to use it !
how-do-i-embed-my-own-fonts-in-a-winforms-app
11 people are following this question.