static Context()
{
//
// This is used to determine what kind of structure
// we should use to marshal Glyphs, as the public
// definition in Cairo uses `long', which can be
// 32 bits or 64 bits depending on the platform.
//
// We assume that sizeof(long) == sizeof(void*)
// except in the case of Win64 where sizeof(long)
// is 32 bits
//
int ptr_size = Marshal.SizeOf<IntPtr>();
var isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
if (isWindows || ptr_size == 4){
c_compiler_long_size = 4;
native_glyph_size = Marshal.SizeOf<NativeGlyph_4byte_longs>();
} else {
c_compiler_long_size = 8;
native_glyph_size = Marshal.SizeOf<Glyph>();
}
}