• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cocoa doesn't use my fonts - all fonts are system fonts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa doesn't use my fonts - all fonts are system fonts


  • Subject: Re: Cocoa doesn't use my fonts - all fonts are system fonts
  • From: Douglas Davidson <email@hidden>
  • Date: Fri, 4 Aug 2006 12:47:09 -0700


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.


Douglas Davidson

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Cocoa doesn't use my fonts - all fonts are system fonts
      • From: Stefan <email@hidden>
References: 
 >Cocoa doesn't use my fonts - all fonts are system fonts (From: Stefan <email@hidden>)
 >Re: Cocoa doesn't use my fonts - all fonts are system fonts (From: "Shawn Erickson" <email@hidden>)
 >Re: Cocoa doesn't use my fonts - all fonts are system fonts (From: Stefan <email@hidden>)

  • Prev by Date: Re: Plugin interface desing?
  • Next by Date: Re: Cocoa doesn't use my fonts - all fonts are system fonts
  • Previous by thread: Re: Cocoa doesn't use my fonts - all fonts are system fonts
  • Next by thread: Re: Cocoa doesn't use my fonts - all fonts are system fonts
  • Index(es):
    • Date
    • Thread