[gtkada] Pango_Font_Description -> Pango_Font_Record'Class ???
Warren W. Gay VE3WWG
ve3wwg at cogeco.ca
Tue Sep 7 19:11:58 CEST 2004
I am attempting to get font metrics with code something like
the following (which does not compile):
declare
Font : aliased Pango_Font_Description := From_String("Courier 12");
Font_Metrics : aliased Pango_Font_Metrics := Get_Metrics(Font.all);
begin
T.Ascent := Get_Ascent(Font_Metrics);
T.Descent := Get_Descent(Font_Metrics);
T.Width := Get_Approximate_Digit_Width(Font_Metrics);
end;
The problem is that I cannot satisfy the type requirements of the
Get_Metrics call. The From_String routine (and others) return
Pango_Font_Description. Fine. BUT Get_Metrics wants a
Pango_Font_Record'Class parameter. Looking at
Pango.Pango_Font_Description shows the type defined as:
type Pango_Font_Description is new Glib.C_Proxy;
How do I go from that to a Pango_Font_Record'Class?
Thanks, Warren.
--
Warren W. Gay VE3WWG
http://home.cogeco.ca/~ve3wwg
More information about the gtkada
mailing list