PyObjC and Quartz - CGContextShowGlyphsAtPoint

Rand Dvorak <[email protected]>
Newsgroups gmane.comp.python.apple
Message-ID <[email protected]>
Hello, 

I was wondering if any would could help with a issue I'm having with some PyObjC and Quartz.  I have a class the creates a pdf contact sheet from a list of images.  I have the need to include bar codes along with each image.  On the sheet is text with the filename of each image and I need to add a barcoded filename along with it.  To this end I downloaded some barcode fonts and am trying to use CGContextDrawTextAtPoint(...) to draw the barcode but am not having any luck.  Through some research I determined that I need to call CGContextDrawGlyphsAtPoint(...) instead, but cannot figure how to get the glyphs to to draw.  I tried just using the bare string, but am getting this error.   

    CGContextShowGlyphsAtPoint(c, 5, 5, self.string.cStringUsingEncoding_(NSUTF8StringEncoding), len(self.string))
ValueError: depythonifying 'unsigned short', got 'str'

Any ideas on how to achieve what I am trying to accomplish here?  Any info would be much appreciated.

Thanks,

Rand

_______________________________________________
Pythonmac-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.