C# の場合、例えば、メモリ上のビットマップに文字を書く場合、Win と Mac で、
以下のように全然違うコードを書かないといけないらしい:

[Win]

Font   font = new Font(fontname, fontsize);
Bitmap  bmp = new Bitmap( (int)width, (int)height,
      System.Drawing.Imaging.PixelFormat.Format32bppArgb );
Graphics g = Graphics.FromImage(bmp);
g.DrawString( text, font, Brushes.White,
    (bmp.Width-size.Width) / 2, (bmp.Height-size.Height) / 2 );
g.Dispose();

[Mac(OSX)]

NSFont font = NSFont.FromFontName(k.ID, k.size);
var   attr = NSDictionary.FromObjectsAndKeys(
         new NSObject[] { font, NSColor.White },
         new NSObject[] { NSStringAttributeKey.Font,
                  NSStringAttributeKey.ForegroundColor } );
NSImage bmp = new NSImage(picsize);
bmp.LockFocus();
text.DrawInRect(
    new CGRect(
      (picsize.Width - size.Width) / 2,
      (picsize.Height - size.Height) / 2,
      size.Width, size.Height ),  attr);
bmp.UnlockFocus();