Re: Visible difference in text: NSTextField vs drawInRect:

2017-04-10 Thread Quincey Morris
On Apr 10, 2017, at 11:20 , Navneet Kumar wrote: > > Actually I’m using text fields for simplicity at a lot of places. And > drawInRect: at some places, in order to vertically centre the multi-line text > more conveniently. Here are some possibilities to consider: 1.

Re: Visible difference in text: NSTextField vs drawInRect:

2017-04-10 Thread Navneet Kumar
Hi, Checked. Both the fonts (text field’s as well as descAttribs) are same with same “spc” values, at run time. Tried with “Arial Bold”, but same result: text field rendering looks bolder and darker. As Rob suggested, if its a more deeper thing like “updateLayer vs not” case, what can be

Re: Visible difference in text: NSTextField vs drawInRect:

2017-04-10 Thread Jens Alfke
That's weird. I think you'll need to do some detective work. - Break at runtime and check what the value of textField.font actually is. - Try using a different font and see if it makes any difference. —Jens ___ Cocoa-dev mailing list

Re: Visible difference in text: NSTextField vs drawInRect:

2017-04-10 Thread Rob Petrovec
updateLayer vs not? By implementing drawRect: it automagically disables updateLayer for that view so the drawing mechanics are different under the hood. NSTextField may be using updateLayer while your manual implementation is not resulting in a different rendering of the text. Also try

Re: Visible difference in text: NSTextField vs drawInRect:

2017-04-10 Thread Navneet Kumar
Yes, the text field seems to draw bold font, but I have set the same bold font in drawInRect: as well. Here’s the code snippet. ——— For text field: bgColor = [[NSColor orangeColor] blendedColorWithFraction:0.25 ofColor:[NSColor yellowColor]]; [bgColor retain];

Re: Visible difference in text: NSTextField vs drawInRect:

2017-04-10 Thread Jens Alfke
> On Apr 10, 2017, at 7:41 AM, Navneet Kumar wrote: > > The image URL to a sample image: http://i63.tinypic.com/xbe0bc.jpg > > The top text is using a text field and bottom text is using drawInRect:. What are the exact text attributes? It

Re: Visible difference in text: NSTextField vs drawInRect:

2017-04-10 Thread gerti-cocoadev
This may or may net help: CGContextRefctx=(CGContextRef)[[NSGraphicsContext currentContext]graphicsPort]; CGContextSetShouldSmoothFonts(ctx,YES); Gerd > On Apr 10, 2017, at 09:41, Navneet Kumar wrote: > > Hi, > > There is visible difference in

Visible difference in text: NSTextField vs drawInRect:

2017-04-10 Thread Navneet Kumar
Hi, There is visible difference in text when setting the same string, same font, same text colour to a text field. And when the same is done via NSString drawInRect method having same attributes for text. The image URL to a sample image: http://i63.tinypic.com/xbe0bc.jpg The top text is using

Re: Current, preferred way to add help to your Mac app?

2017-04-10 Thread Alastair Houghton
On 9 Apr 2017, at 23:00, Richard Charles wrote: > >> On Apr 9, 2017, at 11:55 AM, Alastair Houghton >> wrote: >> >> The documentation isn’t exactly great (at least, the last time I had to use >> it). You might find the following article

Re: Current, preferred way to add help to your Mac app?

2017-04-10 Thread J.E. Schotsman
> On 09 Apr 2017, at 21:00,Alastair Houghton wrote: > > You might find the following article interesting/useful: > > > Interesting! I’ll give it another try