Open misterspeedy opened 1 year ago
Also occurs in "Tables from Types" section.
...and "Enable Only" section of "Filters" section.
...and "Apply AutoFilter" section.
Added this code above the first usage of AutoFit
in the tutorial:
// For non-Windows runtime environments you will have to add these lines to use AutoFit.
// This is because ClosedXML needs a font to work with when computing sizes. You may have
// to use a different font name if Liberation Sans is not installed on the target system.
open System.Runtime.InteropServices
if not (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) then
LoadOptions.DefaultGraphicEngine <- new ClosedXML.Graphics.DefaultGraphicEngine("Liberation Sans")
//
This seems the simplest solution. We could do something similar within the library code, but that doesn't solve the problem of what fonts are installed.
@misterspeedy Using a font name still can turn in a problem on non Windows systems. I think into two altenatives:
What you think?
On Ubuntu, get this error in the Autofitting section of the tutorial: