0
Answer

Using GetCharABCWidthsFloatA

Steve Stovold

Steve Stovold

16y
2k
1
Ok, so basically I am trying to retrieve character metrics from a font so I can perform a number of calculations on this.

I have found this in the API documentation:
        [DllImport("gdi32", EntryPoint = "GetCharABCWidthsFloat")]
        public static extern bool GetCharABCWidthsFloatA(int hDC, int iFirstChar, int iLastChar, ref ABCFLOAT lpABCF);

My question is, how exactly do I tell this function what font I want it to look at, and what characters I want the metrics for.  I'm using VS C#.NET 2005, first time i've had to call an external API though. A code snippet would be much appreciated.