Fonts can be embedded into a report as resources so the document renders and exports identically regardless of the fonts installed on the server.

Embedding the font. In the report action, read the font file, add it as a StiResource, and register it in the font collection:
var fileContent = System.IO.File.ReadAllBytes(StiNetCoreHelper.MapPath(this, "Fonts/Roboto-Black.ttf"));
var resource = new StiResource("Roboto-Black", "Roboto-Black", false, StiResourceType.FontTtf, fileContent, false);
report.Dictionary.Resources.Add(resource);
StiFontCollection.AddResourceFont(resource.Name, resource.Content, "ttf", resource.Alias);

Using the font. Create the font from the collection and assign it to a component:
var dataText = new StiText();
dataText.ClientRectangle = new RectangleD(1, 1, 3, 2);
dataText.Text = "Sample Text";
dataText.Font = StiFontCollection.CreateFont("Roboto-Black", 12, FontStyle.Regular);
report.Pages[0].Components.Add(dataText);

Because the font travels inside the report, server-side exports such as PDF are pixel-perfect even on machines where the font is not installed — important for web applications running on servers with a minimal font set.

Используя этот сайт, вы соглашаетесь на использование файлов Cookie для аналитики и персонализированного контента. Файлы Cookie хранят полезную информацию на вашем компьютере, чтобы помочь нам повысить эффективность и удобство использования. Для получения дополнительной информации, пожалуйста, прочтите Конфиденциальность и Использование Cookie.