Substitution rules linux font doesn't work (AR 16.3.1)

Posted by: vbie on 6 December 2024, 3:16 am EST

    • Post Options:
    • Link

    Posted 6 December 2024, 3:16 am EST

    Hello all,

    Substitution rules linux font doesn’t work. Oracle Linux Server release 7.9 NAME=“Oracle Linux Server” VERSION=“7.9” There are fonts that are located in the folder ~/.local/share/fonts The font configuration file is located at the following path ~/.config/fontconfig/fonts.conf and its structure is as follows:

    [code] <?xml version="1.0"?>

    Microsoft Sans Serif Liberation Sans [/code]

    After checking the fonts and checking for conformance, we get the following

    Calibri: Carlito-Regular.ttf: “Carlito” “Regular”

    Microsoft Sans Serif: LiberationSans-Regular.ttf: “Liberation Sans” “Regular”

    Courier New: nimbusmono-regular.otf: “Nimbus Mono” “Regular”

    Lucida Console: LiberationMono-Regular.ttf: “Liberation Mono” “Regular”

    When we generate a AR report that was saved on the Windows OS and has a structure that you can see in the application and exporting it to PDF, we expect that the fonts will be replaced according to the font substitution rule on Linux

    But we do not see the expected substitution of fonts. It seems that the rules were not applied

    the following commands did not help

    fc-cache -fv

    if frmt service is running it must be restarted

    We create a report on Windows with certain fonts. When generating this report on Linux, it already replaces the fonts that it does not find on Linux with the fonts specified in the font substitution rules. This works for generating reports with subsequent export to xls and partially works when generating with subsequent export to pdf. See the fonts and screenshots in the generated reports in the attachment for different operating systems.

    [code]for family in “Microsoft Sans Serif” “Lucida Console” “Courier New” “Calibri”; d

    done

    Microsoft Sans Serif: LiberationSans-Regular.ttf: “Liberation Sans” “Regular”

    Lucida Console: LiberationMono-Regular.ttf: “Liberation Mono” “Regular”

    Courier New: nimbusmono-regular.otf: “Nimbus Mono” “Regular”

    Calibri: Carlito-Regular.ttf: “Carlito” “Regular”[/code]

    We use the Kestrel web server for the server. The project is very large and for Linux it is built as net6.0. Below you can see a part of our project file example. You can create a small project and deploy it on Linux and see how the export for Excel will work when generating a report and how the export for pdf works. There are no problems for Excel. The font substitution rules work. But for pdf the font substitution rules work partially. I wrote to you about this above. You can ask your development team to investigate this problem.

    <Project Sdk="Microsoft.NET.Sdk.Web">
     <PropertyGroup>
     <TargetFramework>net6.0</TargetFramework>
     <DeployOnBuild>true</DeployOnBuild>
     <PublishProfile>FolderProfile1</PublishProfile>
     <UseSharedCompilation>false</UseSharedCompilation>
     <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
     <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
     </PropertyGroup>
     <ItemGroup>
     <Compile Remove="model\FormatterSettings.cs" />
     <Compile Remove="model\ReportFormatter.cs" />
     <Compile Update="Resources\RptFormatter.Designer.cs">
     <AutoGen>True</AutoGen>
     <DesignTime>True</DesignTime>
     <DependentUpon>RptFormatter.resx</DependentUpon>
     </Compile>
     </ItemGroup>
     <ItemGroup>
     <Content Remove="Properties\web.config" />
     <Content Remove="web.config" />
     </ItemGroup>
     <ItemGroup>
     <PackageReference Include="DevExpress.Document.Processor" Version="19.2.5" />
     <PackageReference Include="DevExpress.Charts.Core" Version="19.2.5" />
     <PackageReference Include="DevExpress.Office.Core" Version="19.2.5" />
     <PackageReference Include="DevExpress.Spreadsheet.Core" Version="19.2.5" />
     <PackageReference Include="GrapeCity.ActiveReports" Version="16.3.1" />
     <PackageReference Include="GrapeCity.ActiveReports.Export.Html" Version="16.3.1" />
     <PackageReference Include="GrapeCity.ActiveReports.Export.Image" Version="16.3.1" />
     <PackageReference Include="GrapeCity.ActiveReports.Export.Pdf" Version="16.3.1" />
     <PackageReference Include="GrapeCity.ActiveReports.Export.Excel" Version="16.3.1" />

    **Please investigate on your part why the font substitution rules work partially only when the report is generated in pdf format?

    In case of generation in xls format everything works successfully.

    Why do Active Reports ignore font substitution rules when generating on Linux?**LinuxWindowsFonts.zipLinuxWindowsFonts.zip

  • Posted 9 December 2024, 5:31 am EST

    Hi Vadym,

    Unfortunately, WinForms in a Linux environment is currently not supported with ActiveReports as per ActiveReports - Requirements.

    However still, if you can provide a minimal sample that replicates the issue along with the environment details that you are deploying it to then we may test the same on our end to see if we can provide you with a workaround for your scenario.

    Additionally, you can try implementing ActiveReports Font Resolver that embeds fonts to Exported PDF files, you may learn more about the same here Fonts Customization.

    Regards,

    Anand

    ExportIssue_AR17.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels