• 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: CTLineCreateWithAttributedString ignoring font size
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CTLineCreateWithAttributedString ignoring font size


  • Subject: Re: CTLineCreateWithAttributedString ignoring font size
  • From: Charles Srstka <email@hidden>
  • Date: Sat, 15 Aug 2009 04:28:06 -0500

On Aug 15, 2009, at 3:40 AM, Alastair Houghton wrote:

Have you tried setting the text matrix to e.g. the identity? From my own experience drawing text with Quartz, the text matrix is often not set to what you might want (which perhaps isn't surprising as it *isn't* part of the graphics state, so it will be set to whatever it was last set to for that context).

Sometime like

 CGContextSetTextMatrix (context, CGAffineTransformIdentity);

should do it.

Kind regards,

That works, thanks.

Now I'm just trying to figure out why it's ignoring the NSBackgroundColorAttributeName attribute. For the time being, I've got a workaround in just drawing the background color with NSRectFill, but this feels like a kludge, and that I really should be doing something differently to draw the background the "right" way.

Charles
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: CTLineCreateWithAttributedString ignoring font size
      • From: Alastair Houghton <email@hidden>
References: 
 >CTLineCreateWithAttributedString ignoring font size (From: Charles Srstka <email@hidden>)
 >Re: CTLineCreateWithAttributedString ignoring font size (From: Alastair Houghton <email@hidden>)

  • Prev by Date: Re: Multi-User DB That Talks to Core Data?
  • Next by Date: initWithCoder but I do not have nib file
  • Previous by thread: Re: CTLineCreateWithAttributedString ignoring font size
  • Next by thread: Re: CTLineCreateWithAttributedString ignoring font size
  • Index(es):
    • Date
    • Thread