Fontsize
Hello, the System.drawing is available on the app, but when I want to call the Font function and change the font and its size, I get an error message. Does someone have a clue about how to change the font size ? Thanks !
i think its TextSize if im not wrong
I searched and text-size is for CSS, all I found for C# is the Font class (which doesn't work), and the Labell. , which is only available in the Windows.Forms library.
Font size? Are we talking about the console? And what error message? PlatformNotImplementedException? System.Drawing.Common is what is in the app, just data structures. Android doesn't have the features Windows does in System.Drawing. I'll add a FontSize property to the app's Console class.
To change the font size, all I found on the net was to create a new Font. So I wrote : Font test = New Font("Arial", 24);
And I got :
System.PlatformNotSupportedException: Operation is not supported on this platform.
at System.Drawing.Font..ctor (System.String familyName, System.Single emSize) [0x00006] in
Yes, pretty much what I expected. Not implemented for Android. Probably only the basics are. Additionally, it seems Microsoft are removing that package entirely for non-Windows platforms. https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/6.0/system-drawing-common-windows-only
If we're talking about platform specific equavelents then a Font is a Typeface in Android. And the Android.Graphics namespace contans stuff like Bitmap and Canvas. These are all in Mono.Android.dll