FROM : Stefan
DATE : Fri Aug 04 21:53:09 2006
Am 04.08.2006 um 21:47 schrieb Douglas Davidson:
>
> On Aug 4, 2006, at 11:24 AM, Stefan wrote:
>
>> Now, I tried adding a dictionary using withAttributes: and define its
>> properties using
>>
>> >>>
>> drawDict2 = [NSDictionary dictionaryWithObject:font2
>> forKey:NSFontAttributeName];
>> <<<
>>
>> which immediately succeeded. Not sure, but this feels like a bug.
>> I really wonder,
>> why accessing font metrics worked, while drawing the font failed....
>>
>
> The string drawing methods (in fact, the entire Cocoa text system)
> always ignore the font set on the context, in favor of their own
> attributes. If you don't supply an attribute dictionary, a default
> set of attributes will be used. Use the attribute dictionary, or
> create an attributed string.
OK, understood. But what for is:
>>>
[font1 set];
<<<
Does it do anything usefull?
DATE : Fri Aug 04 21:53:09 2006
Am 04.08.2006 um 21:47 schrieb Douglas Davidson:
>
> On Aug 4, 2006, at 11:24 AM, Stefan wrote:
>
>> Now, I tried adding a dictionary using withAttributes: and define its
>> properties using
>>
>> >>>
>> drawDict2 = [NSDictionary dictionaryWithObject:font2
>> forKey:NSFontAttributeName];
>> <<<
>>
>> which immediately succeeded. Not sure, but this feels like a bug.
>> I really wonder,
>> why accessing font metrics worked, while drawing the font failed....
>>
>
> The string drawing methods (in fact, the entire Cocoa text system)
> always ignore the font set on the context, in favor of their own
> attributes. If you don't supply an attribute dictionary, a default
> set of attributes will be used. Use the attribute dictionary, or
> create an attributed string.
OK, understood. But what for is:
>>>
[font1 set];
<<<
Does it do anything usefull?
| Related mails | Author | Date |
|---|---|---|
| Stefan | Aug 4, 20:07 | |
| Shawn Erickson | Aug 4, 20:16 | |
| Stefan | Aug 4, 20:24 | |
| Douglas Davidson | Aug 4, 21:47 | |
| Stefan | Aug 4, 21:53 | |
| Douglas Davidson | Aug 4, 21:59 |






Cocoa mail archive

