Hello,
Can you please help me how to solve the problem with usage of custom fonts on Linux. I embedded them into C# project and use this part of code
List fontSources = new List(fontSettings.GetFontsSources());
string projectRoot = Directory.GetCurrentDirectory();
string targetFolderRelativePath = “Fonts”;
string targetFolderPath = Path.Combine(projectRoot, targetFolderRelativePath);
FolderFontSource folderFontSource = new FolderFontSource(targetFolderPath, true);
fontSources.Add(folderFontSource);
FontSourceBase[] updatedFontSources = fontSources.ToArray();
fontSettings.SetFontsSources(updatedFontSources);
fontSettings.SubstitutionSettings.DefaultFontSubstitution.DefaultFontName = “Arial”;
document.FontSettings = fontSettings;
document.FontInfos.EmbedTrueTypeFonts = true;
document.FontInfos.EmbedSystemFonts = true;
This work well on Windows but on Linux it looks like he just goes over this part and does not do anything with that. Is it necessary to install fonts on Linux or I missing something in this code?
This Topic is created by awais.hafeez using Email to Topic tool.