Skip navigation.
 
mlRe: Cocoa doesn't use my fonts - all fonts are system fonts
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?

Related mailsAuthorDate
mlCocoa doesn't use my fonts - all fonts are system fonts Stefan Aug 4, 20:07
mlRe: Cocoa doesn't use my fonts - all fonts are system fonts Shawn Erickson Aug 4, 20:16
mlRe: Cocoa doesn't use my fonts - all fonts are system fonts Stefan Aug 4, 20:24
mlRe: Cocoa doesn't use my fonts - all fonts are system fonts Douglas Davidson Aug 4, 21:47
mlRe: Cocoa doesn't use my fonts - all fonts are system fonts Stefan Aug 4, 21:53
mlRe: Cocoa doesn't use my fonts - all fonts are system fonts Douglas Davidson Aug 4, 21:59