Last post Feb 01, 2016 03:08 PM by PatriceSc
Mar 16, 2015 12:47 AM|OzBob|LINK
following the guidance on
"Minimum supported server Windows 2000 Server [desktop apps only]"
So how am I going to retrieve an embedded Font, say 'Verdana' from the GDI private font collection?
This is not working on Azure hosted Asp.Net site, on my local PC the byteCount is logical and correct (240456) but the uInt returned from code
hosted on Asp.net is out of range (322122506) for byte array.
System.Drawing.Font gdiFont = font;
IntPtr hfont = gdiFont.ToHfont();//System.Drawing
IntPtr hdc = NativeMethods.GetDC(IntPtr.Zero);//user32.dll
IntPtr oldFont = NativeMethods.SelectObject(hdc, hfont);//gdi32.dll
uint byteCount = NativeMethods.GetFontData(hdc, nameTableKey, 0, fontData, 0);//gdi32.dll
Feb 01, 2016 03:08 PM|PatriceSc|LINK
What are you trying to do? .NET functions to get font information are not enough? Also keep in mind that server side fonts are unrelated to the fonts that are found client side. Are you using an Azure VM or an Azure web app? I woudl suspect a 32 bit vs 64
bit issue maybe. What is the return value for GetDC ??? It seems to make little sense for a web app.
I suspect you might be in a case where what you are doing seems to work on your own machine as both the server and the client are the same while it won't ever work on a real web server.