[gtkada] Pb with Pango.Font and Gdk.Font

Sami EVANGELISTA sami.evangelista at wanadoo.fr
Wed Jul 9 12:11:30 CEST 2003


Hi all

I recently upgraded to gtk 2.2 and i have some problems when dealing 
with fonts.
My program looks like this

---------------------------------------------------------------
with pango.font; use pango.font;
with gdk.font; use gdk.font;
with gdk;
...

procedure test is
   Desc : pango_font_description;
   F : Gdk_Font;
   ...
begin
   ...
   Desc := From_String("Sans 12");
   if Desc = null  then
      raise Constraint_Error;
   end if;
   F := From_Description(Desc);
   if Gdk."="(F, null) then
      raise Constraint_Error;
   end if;
   ...
end;
---------------------------------------------------------------

The first exception is never raised as the second one is always. I have 
two questions :
1) does the string in the from_string call have to have a special format?
2) how can i know the installed fonts on the system?

Thanks




More information about the gtkada mailing list