I have noticed that Aspose.Words references System.Drawing in the Font Class. Given the warnings on this page ( System.Drawing Namespace | Microsoft Learn), would using this font class not cause issues on Linux?
PS: We are using Aspose.Words version 25.2.0 on an Azure Linux App service, without access to the underlying OS platform, meaning we can’t install libfontconfig1 and the other libraries.
Summary
The provided evidence does not contain any information about Aspose.Words for .NET referencing System.Drawing, the behavior of the DocumentBuilder.Font class on Linux, or the impact of missing native libraries such as libgdiplus or libfontconfig. Consequently, the draft answer’s claims about platform‑specific exceptions, version‑specific fixes (e.g., Aspose.Words 25.10 removing the dependency), and suggested work‑arounds are not supported by the retrieved sources.
Why it happens
There is no evidence in the supplied material that explains how Aspose.Words interacts with System.Drawing on Linux, nor any documentation or release notes confirming a change in dependency in later versions.
What to do next
Since the current evidence does not address the question, you should consult the official Aspose.Words for .NET documentation or release notes, or run a targeted test in your Linux environment to observe whether DocumentBuilder.Font triggers a PlatformNotSupportedException when the GDI+ libraries are absent. If you need definitive guidance, consider reaching out to Aspose support or checking the product’s changelog for the version you are using.
Note: The answer above reflects the lack of supporting evidence in the provided sources.
I could not fully verify this explanation against the retrieved sources. Please double-check the behaviour in your environment and confirm the exact SDK/version.
@ihouvetSystem.Drawing.Color is System.Drawing primitive, the same as Rectangle , RectangleF , Point and PointF and is not platform dependent and is not a part of System.Drawing.Common. You can safely use these primitives in your .NET Standard or .NET Core projects under Linux. .NET Standard and .NET6 version of Aspose.Words does not use System.Drawing to deal with graphics, these versions uses SkiaSharp.