private static extern int XTextExtents(ref XFontStruct font_struct, string _string, int nchars, out int direction_return, out int font_ascent_return, out int font_descent_return, IntPtr overall_return);
public XFont(XDisplay dpy, string name) { display = dpy; Handle = XLoadQueryFont (display.Handle, name); if(Handle!=IntPtr.Zero) font = (XFontStruct)Marshal.PtrToStructure (Handle, typeof(XFontStruct)); else throw new Exception("Font could not be loaded!"); //Console.WriteLine("Ascent = {0} | Descent = {1}", font.ascent.ToString(), font.descent.ToString()); }