• 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: Drawing text with specifying font
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing text with specifying font


  • Subject: Re: Drawing text with specifying font
  • From: Douglas Davidson <email@hidden>
  • Date: Fri, 6 Jul 2001 12:54:16 -0700

On Friday, July 6, 2001, at 10:52 AM, Candide Kemmler wrote:

I'm trying to draw text with various transformations and a font.

The transformations work, but I can't specify the font.

I tried [ NSFont set ] (you know what I mean), but when I do

[NSString drawAtPoint:p withDictionary:nil ],

the font remains to a default value.

Perhaps I should consider the dictionary to be provided. But in the absence of any doc, I just set it to nil.

The dictionary to be supplied here is a standard attribute dictionary, just like you would find on any attributed string. See the AppKit's NSAttributedString.h header for a list of the attributes you can set; the one you want here is NSFontAttributeName. If you want your string to use more than one font, you can simply create an attributed string and draw that directly, rather than specifying a string and an attribute dictionary.

Douglas Davidson


References: 
 >Drawing text with specifying font (From: Candide Kemmler <email@hidden>)

  • Prev by Date: Re: default method on an object
  • Next by Date: Re: Drawing text with specifying font
  • Previous by thread: Re: Drawing text with specifying font
  • Next by thread: Re: Drawing text with specifying font
  • Index(es):
    • Date
    • Thread