New to Telerik Document Processing? Start a free 30-day trial
RadPdfProcessing manually register font
Updated on Jun 5, 2026
Environment
| Product Version | Product | Author |
|---|---|---|
| 2020.1.114 | RadPdfProcessing for .NET Standard | Dimitar Karamfilov |
Description
The RadPdfProcessing library for .NET Standard does not search for fonts on the operating system. Instead, it falls back to the standard fonts.
Solution
Register the fonts manually in your application.
Example 1: Register and Use a Custom Font
csharp
var fontData = File.ReadAllBytes(@"..\..\..\Roboto-Bold.TTF");
FontsRepository.RegisterFont(new FontFamily("Roboto"), FontStyles.Normal, FontWeights.Bold, fontData);
Block block = new Block();
block.InsertText(new FontFamily("Roboto"), FontStyles.Normal, FontWeights.Bold, "Text");
editor.Position.Translate(100, 100);
editor.DrawBlock(block);