Re: [Pyobjc-dev] CoreText CTFontCreatePathForGlyph :: not defined?
Brought to you by:
ronaldoussoren
|
From: James T. <tra...@gm...> - 2009-04-22 07:35:09
|
It seems like some names can't be found. CoreText is one of them.
from CoreText import *
objc.loadBundleFunctions(CoreText.__bundle__, globals(), [
('CTFontCreatePathForGlyph', '@@sn^{CGAffineTransform=ffffff}')
], False)
Produces: NameError: name 'CoreText' is not defined
I tried manually loading the bundle as follows:
objc.loadBundle("CoreText", globals(),
bundle_path=objc.pathForFramework(u'/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework'))
Which also fails.
-jt
On Wed, Apr 22, 2009 at 7:22 AM, Ronald Oussoren <ron...@ma...> wrote:
>
> On 21 Apr, 2009, at 20:59, James Trankelson wrote:
>
>> Hi,
>>
>> I'm trying to do some CoreText suff (10.5). Most of the calls are
>> fine, but one fails:
>>
>> global name 'CTFontCreatePathForGlyph' is not defined
>>
>> Is there any way around this?
>
> Which version of PyObjC do you use? I guess it's the one included in
> Leopard, that seems to mis the symbol while PyObjC 2.2 does have it.
>
> Adding a new function can be done using objc.loadBundleFunctions:
>
> import objc
> import CoreText
> objc.loadBundleFunctions(CoreText.__bundle__, globals(), [
> ('CTFontCreatePathForGlyph',
> '@@sn^{CGAffineTransform=ffffff}')
> ], False)
>
> The code above (untested) should add 'CTFontCreatePathForGlyph' to the
> globals dictionary.
>
> Ronald
>>
>> Thanks
>>
>> -jt
>>
>>
>> ------------------------------------------------------------------------------
>> Stay on top of everything new and different, both inside and
>> around Java (TM) technology - register by April 22, and save
>> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
>> 300 plus technical and hands-on sessions. Register today.
>> Use priority code J9JMT32. http://p.sf.net/sfu/p
>> _______________________________________________
>> Pyobjc-dev mailing list
>> Pyo...@li...
>> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev
>
>
|