Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

my font haven't be shown in print preview stimulsoft

I am using StimulSoft software for showing reports in my asp.net mvc project.
In my report all of things is OK, but In print preview my font haven't be applied.
I attached my font in report.cshtml file by using font-face.
How can I solve this problem?

like image 560
Majid Basirati Avatar asked Dec 18 '22 06:12

Majid Basirati


2 Answers

In old versions; as @Abbas-Mirzaei said, you have to install fonts on server. stimulsoft reports.net doesn't support import or embed fonts before 2016 versions. but in newer version you can add fonts.

Stimulsoft.Base.StiFontCollection.AddFontFile(@"d:\Work\Resources\glyphicons-halflings-regular.ttf");
like image 108
Ramin Alirezaee Avatar answered Jan 13 '23 20:01

Ramin Alirezaee


Add font in project for example(fonts folder) then add this code into your service

Stimulsoft.Base.StiFontCollection.AddFontFile(Server.MapPath("~/fonts/my-font/font-name.ttf"));

Then add your fonts to server font folder too!

like image 44
RainyTears Avatar answered Jan 13 '23 20:01

RainyTears