我的字体没有在打印预览 Stimulsoft 中显示
my font haven't be shown in print preview stimulsoft
我正在使用 StimulSoft 软件在我的 asp.net mvc 项目中显示报告。
在我的报告中一切正常,但在打印预览中我的字体没有应用。
我使用 font-face
.
在 report.cshtml
文件中附加了我的字体
我该如何解决这个问题?
我也遇到了这个问题...如果您可以访问它,您可以将您的字体添加到服务器字体文件夹...(c:\windows\fonts)
在旧版本中;正如@Abbas-Mirzaei 所说,您必须在服务器上安装字体。
stimulsoft reports.net 不支持导入或嵌入 2016 版本之前的字体。
但在较新的版本中,您可以添加字体。
Stimulsoft.Base.StiFontCollection.AddFontFile(@"d:\Work\Resources\glyphicons-halflings-regular.ttf");
在 Controller 中添加字体以在 Razor 页面中加载:
Stimulsoft.Base.StiFontCollection.AddFontFile(@"d:\Work\Resources\glyphicons-halflings-
regular.ttf");
例如在项目中添加字体(字体文件夹),然后将此代码添加到您的服务中
Stimulsoft.Base.StiFontCollection.AddFontFile(Server.MapPath("~/fonts/my-font/font-name.ttf"));
然后将您的字体也添加到服务器字体文件夹中!
我正在使用 StimulSoft 软件在我的 asp.net mvc 项目中显示报告。
在我的报告中一切正常,但在打印预览中我的字体没有应用。
我使用 font-face
.
在 report.cshtml
文件中附加了我的字体
我该如何解决这个问题?
我也遇到了这个问题...如果您可以访问它,您可以将您的字体添加到服务器字体文件夹...(c:\windows\fonts)
在旧版本中;正如@Abbas-Mirzaei 所说,您必须在服务器上安装字体。 stimulsoft reports.net 不支持导入或嵌入 2016 版本之前的字体。 但在较新的版本中,您可以添加字体。
Stimulsoft.Base.StiFontCollection.AddFontFile(@"d:\Work\Resources\glyphicons-halflings-regular.ttf");
在 Controller 中添加字体以在 Razor 页面中加载:
Stimulsoft.Base.StiFontCollection.AddFontFile(@"d:\Work\Resources\glyphicons-halflings-
regular.ttf");
例如在项目中添加字体(字体文件夹),然后将此代码添加到您的服务中
Stimulsoft.Base.StiFontCollection.AddFontFile(Server.MapPath("~/fonts/my-font/font-name.ttf"));
然后将您的字体也添加到服务器字体文件夹中!