Re: Drawing text like Lion's Mail

2011-08-08 Thread Chase Latta
Andre, I was digging through some old code and found this method I wrote awhile ago. I remember basing this off of a blog post or email thread but I don't remember the original source. I used this for something real quick so the code is not perfect but may be a good starting point to get what

Re: Drawing text like Lion's Mail

2011-08-08 Thread Andre Masse
Seems like a lot of work for a simple effect. I may play again with this later on this project. I have save this thread in Mail which is telling me that there's "20 messages selected" using its fancy font effect :-) Thanks for all infos guys, Andre Masse On 08/08/2011, at 13:29 , David Dunca

Re: Drawing text like Lion's Mail

2011-08-08 Thread David Duncan
On Aug 8, 2011, at 10:21 AM, Jean-Daniel Dupas wrote: > Le 8 août 2011 à 18:50, David Duncan a écrit : > >> On Aug 8, 2011, at 8:16 AM, Jean-Daniel Dupas wrote: >> >>> >>> I think you can create a CGPath from some text using CTFrameGetPath(). >>> Once you get the path, you can do whatever you w

Re: Drawing text like Lion's Mail

2011-08-08 Thread Jean-Daniel Dupas
Le 8 août 2011 à 18:50, David Duncan a écrit : > On Aug 8, 2011, at 8:16 AM, Jean-Daniel Dupas wrote: > >> >> I think you can create a CGPath from some text using CTFrameGetPath(). >> Once you get the path, you can do whatever you want (clipping, shadow, >> gradient, …). > > > CTFrameGetPath

Re: Drawing text like Lion's Mail

2011-08-08 Thread David Duncan
On Aug 8, 2011, at 8:16 AM, Jean-Daniel Dupas wrote: > > I think you can create a CGPath from some text using CTFrameGetPath(). > Once you get the path, you can do whatever you want (clipping, shadow, > gradient, …). CTFrameGetPath() returns the path used to create the frame, typically a rect

Re: Drawing text like Lion's Mail

2011-08-08 Thread Siegfried
On 08/08/2011, at 12:16, Jean-Daniel Dupas wrote: > I think you can create a CGPath from some text using CTFrameGetPath(). > Once you get the path, you can do whatever you want (clipping, shadow, > gradient, …). Ah, then that's the way to go! Thanks Jean-Daniel. The image I created used as back

Re: Drawing text like Lion's Mail

2011-08-08 Thread Jean-Daniel Dupas
I think you can create a CGPath from some text using CTFrameGetPath(). Once you get the path, you can do whatever you want (clipping, shadow, gradient, …). Le 8 août 2011 à 02:22, Andre Masse a écrit : > Interesting. Not sure if could be possible to convert the text to an image, > apply a grad

Re: Drawing text like Lion's Mail

2011-08-07 Thread Andre Masse
Interesting. Not sure if could be possible to convert the text to an image, apply a gradient and use one of the copy method of NSImage. I needed a break from coding data migration, hence the pause trying this. Now, I'm back to the boring part ;-) Looks like your image didn't pass the list. Feel

Re: Drawing text like Lion's Mail

2011-08-07 Thread Siegfried
On 07/08/2011, at 10:52, Andre Masse wrote: > For those interested, Matt and Kyle were right. Helvetica Neue Bold 20pts. > All my attempts to replicate the shadow have failed though. I'm using 85% > white and it's good enough for me. > The shadow is just an "inner shadow". The problem is that

Re: Drawing text like Lion's Mail

2011-08-07 Thread Andre Masse
For those interested, Matt and Kyle were right. Helvetica Neue Bold 20pts. All my attempts to replicate the shadow have failed though. I'm using 85% white and it's good enough for me. Thanks to all, Andre Masse ___ Cocoa-dev mailing list (Cocoa-dev

Re: Drawing text like Lion's Mail

2011-08-05 Thread Durango
Helvetica Neue? -- Matt On Wed, Aug 3, 2011 3:26 PM, Andre Masse wrote: >Thanks but after having done 10+ screenshots and doing side by side >comparisons, it clearly isn't Lucida Grande. It's very close to >Helvetica but the kerning is different. > >Andre Masse > >On 03/08/2011, at 17:52 , Thom

Re: Drawing text like Lion's Mail

2011-08-03 Thread Andre Masse
I've downloaded it and looks like it works on Lion. Never used it, so I may have to spend some time looking at tutorials. Thanks for the suggestion, Andre Masse On 03/08/2011, at 22:02 , Andy Lee wrote: > Does F-Script Anywhere work on Lion? Maybe you can inspect the view and find > a clue.

Re: Drawing text like Lion's Mail

2011-08-03 Thread Andy Lee
Does F-Script Anywhere work on Lion? Maybe you can inspect the view and find a clue. A bit of a long shot if they're doing totally custom drawing, but might be worth a try. Maybe they're using a custom cell of some kind and you can look at the font settings. --Andy On Aug 3, 2011, at 7:18 PM,

Re: Drawing text like Lion's Mail

2011-08-03 Thread Andre Masse
Forget that last one. Found how and it's worst :-) Andre Masse PS: if anybody want that, here's how: CGContextRef context = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort]; CGContextSetShouldAntialias(context, NO); On 03/08/2011, at 20:10 , Andre Masse wrote: > Think I could

Re: Drawing text like Lion's Mail

2011-08-03 Thread Andre Masse
Think I could be close if I could turn off anti-aliasing. Is there any way to do that in -drawRect ? Thanks, Andre Masse ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Conta

Re: Drawing text like Lion's Mail

2011-08-03 Thread Andre Masse
Good guess but no luck. Looks like a demi bold version of Helvetica, but since there's no font inside Mail's package, it can't be. Well, I don't really need to be perfect. Close but pretty would be enough. It's definitely 19.0pt its though. Could be drawn letter by letter, you never know :-) Th

Re: Drawing text like Lion's Mail

2011-08-03 Thread Kyle Sluder
On Wed, Aug 3, 2011 at 3:26 PM, Andre Masse wrote: > Thanks but after having done 10+ screenshots and doing side by side > comparisons, it clearly isn't Lucida Grande. It's very close to Helvetica but > the kerning is different. Helvetica Neue? It's very clearly not Lucida Grande. --Kyle Slud

Re: Drawing text like Lion's Mail

2011-08-03 Thread Andre Masse
Thanks but after having done 10+ screenshots and doing side by side comparisons, it clearly isn't Lucida Grande. It's very close to Helvetica but the kerning is different. Andre Masse On 03/08/2011, at 17:52 , Thomas Davie wrote: > > No – it's using the system font – Lucida Grande. > > Bob

Re: Drawing text like Lion's Mail

2011-08-03 Thread Thomas Davie
On 3 Aug 2011, at 22:40, Andre Masse wrote: > One less pass is good. Thanks. > > Unfortunately, text is not as clean as Mail at this point. Small characters > like "e" loose sharpness (white space inside the character is reduced). Still > trying to find a winner by mixing different values. I'm

Re: Drawing text like Lion's Mail

2011-08-03 Thread Andre Masse
One less pass is good. Thanks. Unfortunately, text is not as clean as Mail at this point. Small characters like "e" loose sharpness (white space inside the character is reduced). Still trying to find a winner by mixing different values. I'm not so sure Mail is using Helvetica now. Thanks for y

Re: Drawing text like Lion's Mail

2011-08-03 Thread Jens Alfke
You can draw it in one pass using NSShadowAttributeName. —Jens smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact th

Drawing text like Lion's Mail

2011-08-03 Thread Andre Masse
Hi, In the new Mail, when there's no selection, the detail's view show "No Message Selected" in an what seems to be embossed text. My various attempts to emulate that, have failed. Well it kinda work but it's a bit ugly. Here's what I've done: - (BOOL)isFlipped { return YES; } - (void)dra