The Linux version of TX Text Control represents a significant milestone in document processing, providing a platform-independent solution with high-quality rendering and performance. This article focuses on the transformative changes made to the font rendering system for the Linux offering.
TX Text Control's font rendering system has been rewritten to ensure cross-platform compatibility. The result is a robust, platform-independent solution that delivers accurate, high-quality font rendering in Linux environments without sacrificing speed and efficiency.
Originally, TX Text Control relied on Windows-specific font rendering. The transition to Linux involved significant technical updates, including an overhaul of key components such as the window management system. This ensures TX Text Control seamlessly integrates with Linux while maintaining its rich functionality and performance.
On Windows, fonts were sourced directly from installed system fonts. However, newer systems like Windows Server 2025 often lack a full font set, requiring manual installation to ensure proper document rendering.
This manual font installation process was particularly problematic in environments such as Docker or cloud deployments, where managing system fonts can be complex and time-consuming. Users had to manually configure and ensure correct font availability, adding complexity to deployment.
TX Text Control now introduces a built-in font system that provides a comprehensive set of fonts out-of-the-box, eliminating the need for manual font installation.
With the new built-in font system, documents render correctly regardless of the environment, simplifying deployment and management.
After adding the NuGet package to a project, a Fonts folder is automatically included, containing a standard set of sans-serif and serif fonts.
The fonts in this folder can now be used with the TX Text Control to load documents and export them to PDF, for example.
To use other fonts, you can simply copy additional fonts to the predefined Fonts folder when you deploy your application, or you can specify a second location. In the sample application, we simply created a new folder called Additional Fonts and copied Arial and Segoe UI into it.
Now all you need to do is call the static InstallFonts method to register the fonts in the folder.
// Register additional fonts
TXTextControl.ServerTextControl.InstallFonts("Additional Fonts");
The new Fonts folder in TX Text Control for Linux provides significant benefits for deployment in App Services or Docker containers. The Fonts folder allows you to package all required fonts directly with your application, eliminating the need to rely on system-installed fonts. This ensures that the application works consistently, regardless of the hosting environment, without additional configuration.
In environments like Docker or Azure App Services, managing and installing system fonts can be challenging due to their lightweight and isolated nature. The Fonts folder streamlines this process by bundling fonts with the application, reducing the complexity of deployment pipelines. By embedding fonts in the application, you can ensure consistent document rendering across instances, environments, and updates. This is particularly beneficial for scaling applications in cloud environments, as font availability is no longer a variable.
Applications with bundled font folders are portable and can be deployed across multiple infrastructures without modification. This makes the solution ideal for containerized deployments where simplicity and predictability are key. There's no need to manage or update system fonts separately. All required font updates can be handled within the application package itself, providing a centralized and straightforward workflow. This innovation ensures a more efficient, reliable, and predictable deployment experience, allowing developers to focus on functionality without worrying about font dependencies.