Re: how to use pango_ot_info_list_* ?



On Wed, 2005-05-04 at 11:32 +0800, Arne Götje (=?utf-8?q?
=E9=AB=98=E7=9B=9B=E8=8F=AF?=) wrote:
> Hi list,
> 
> sorry, if this question sounds a bit silly, but I'm not an experienced 
> programmer and need some help.
> 
> I want to print the available GSUB scripts, languages and features of a 
> specific font on the screen.
> 
> No I have:
> 
> PangoOTInfo *info = pango_ot_info_get (face);
> PangoOTTag *tag = pango_ot_info_list_scripts (info, 
> PANGO_OT_TABLE_GSUB);
> 
> But when I try to iterate the 'tag' array, I always get segmentation 
> faults. What would be the correct way?

0 is used as a sentinel value, so 

 scripts = pango_ot_info_list_scripts (info,PANGO_OT_TABLE_GSUB);
 for (i = 0; scripts[i]; i++) 
   {
      print ("Have script %x\n", scripts[i]);
  }

Should work
						Owen

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]