GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: a tiny graphical app kit for ruby
Homepage: http://code.whytheluckystiff.net/shoes
Clone URL: git://github.com/why/shoes.git
 * shoes/native/cocoa.m: shoes_font_list stalled under os x.
why (author)
Mon Oct 06 09:25:35 -0700 2008
commit  4d450e1ee1e9a6e27742b033d29b9527967c2ff8
tree    67182b237d67c8774b4f0c380f81f33728c40f5f
parent  7184a4ae56a1253fbe08cc58011d4694e07a4cc2
...
494
495
496
497
 
498
499
500
 
501
502
503
504
505
 
506
507
508
...
494
495
496
 
497
498
499
 
500
501
502
503
504
 
505
506
507
508
0
@@ -494,15 +494,15 @@ shoes_font_list()
0
   ATSFontRef fontRef = 0;
0
   NSMutableArray *outArray;
0
   VALUE ary = rb_ary_new();
0
- while (noErr == ATSFontIteratorCreate(kATSFontContextLocal, nil, nil,
0
+ if (noErr == ATSFontIteratorCreate(kATSFontContextLocal, nil, nil,
0
          kATSOptionFlagsUnRestrictedScope, &fi))
0
   {
0
- if (noErr == ATSFontIteratorNext(fi, &fontRef))
0
+ while (noErr == ATSFontIteratorNext(fi, &fontRef))
0
     {
0
       NSString *fontName;
0
       ATSFontGetName(fontRef, kATSOptionFlagsDefault, &fontName);
0
       if (fontName != NULL)
0
- rb_ary_push(families, rb_str_new2([fontName UTF8String]));
0
+ rb_ary_push(ary, rb_str_new2([fontName UTF8String]));
0
     }
0
   }
0
   

Comments

    No one has commented yet.