#628: CTFramesetterCreateFrame doesn't like the CFRange type
---------------------------+------------------------------------------------
Reporter: ea...@… | Owner: lsansone...@…
Type: defect | Status: new
Priority: major | Milestone:
Component: MacRuby | Keywords:
---------------------------+------------------------------------------------
Description changed by martinlagarde...@…:
Old description:
> An attempt to call CTFramesetterCreateFrame and passing a CFRange
> structure generates an error message:
>
> unrecognized runtime type `{?=qq}'
>
> Here's the script I was using:
>
> font = NSFont.fontWithName("TrebuchetMS", :size=> 24.0)
> attributes = NSDictionary.dictionaryWithObjectsAndKeys(font,
> NSFontAttributeName, nil)
> attributedString = CFAttributedStringCreate(nil, "$", attributes)
> framesetter = CTFramesetterCreateWithAttributedString(attributedString)
>
> framePath = CGPathCreateMutable()
> CGPathAddRect(framePath, nil, CGRectMake(4, 4, 32, 32));
> textFrame = CTFramesetterCreateFrame(framesetter, CFRangeMake(0.0, 1.0),
> framePath, nil);
New description:
An attempt to call CTFramesetterCreateFrame and passing a CFRange
structure generates an error message:
{{{
unrecognized runtime type `{?=qq}'
}}}
Here's the script I was using:
{{{
#!ruby
font = NSFont.fontWithName("TrebuchetMS", :size=> 24.0)
attributes = NSDictionary.dictionaryWithObjectsAndKeys(font,
NSFontAttributeName, nil)
attributedString = CFAttributedStringCreate(nil, "$", attributes)
framesetter = CTFramesetterCreateWithAttributedString(attributedString)
framePath = CGPathCreateMutable()
CGPathAddRect(framePath, nil, CGRectMake(4, 4, 32, 32));
textFrame = CTFramesetterCreateFrame(framesetter, CFRangeMake(0.0, 1.0),
framePath, nil);
}}}
--
--
Ticket URL: <http://www.macruby.org/trac/ticket/628#comment:1>
MacRuby <http://macruby.org/>
_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel