Yes, I'm sure. :-) You won't get the subpixel font smoothing right, if
nothing else.
Also, the other method tracks whatever the current human interface design is
for text on a raised surface.

-Ken

On Sun, Feb 22, 2009 at 2:16 PM, Graham Cox <graham....@bigpond.com> wrote:

>
> On 23/02/2009, at 4:43 AM, Ken Ferry wrote:
>
>  This effect cannot be implemented with text attributes.
>>
>
>
> Are you sure? This gets awfully close, unless I'm missing the point here
> (the font to use your choice):
>
> + (NSDictionary*)       defaultTitleAttributes
> {
>        // return the dictionary used to specify the attributes for drawing
> the title string in the palette windows. Override to
>        // customize the title string
>
>        static NSDictionary*    sTitleAttrs = nil;
>
>        if ( sTitleAttrs == nil )
>        {
>                NSFont* font = [NSFont boldSystemFontOfSize:11.0];
>                NSMutableParagraphStyle* style = [[NSParagraphStyle
> defaultParagraphStyle] mutableCopy];
>
>                [style setAlignment:NSCenterTextAlignment];
>
>                NSShadow* shadw = [[NSShadow alloc] init];
>
>                [shadw setShadowColor:[NSColor whiteColor]];
>                [shadw setShadowOffset:NSMakeSize( 0, -1.5 )];
>                [shadw setShadowBlurRadius:1.0];
>
>                sTitleAttrs = [NSDictionary
> dictionaryWithObjectsAndKeys:font,NSFontAttributeName,
>
>  style,NSParagraphStyleAttributeName,
>
>  shadw, NSShadowAttributeName,
>
>  nil];
>                [sTitleAttrs retain];
>                [style release];
>                [shadw release];
>        }
>
>        return sTitleAttrs;
> }
>
>
>
> --Graham
>
>
>
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to