Hi, The image with bigger (21.0 points) Arial font is uploaded here: http://i65.tinypic.com/118g0fl.jpg The effect is clearly visible. The window is of a new small project made to show/resolve this issue only. I can send this small (around 50KB) project via email if you want.
Please look at my responses to the points raised below. > On 11-Apr-2017, at 2:00 AM, Quincey Morris > <[email protected]> wrote: > > On Apr 10, 2017, at 11:20 , Navneet Kumar <[email protected] > <mailto:[email protected]>> 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. Shadow. What happens if you don’t specify the shadow? > I have not specified any shadow to text field. > 2. Resolution. It may be that the text drawing ends up in drawing contexts > with different resolution backing stores (1x vs. 2x vs. 3x). > I do have retina display, but shouldn’t that be same for the two cases (text field and drawInRect:). > 3. Size. Does the weird effect scale with point size? If you draw the text > much larger, are the results much closer to each other? > Now using the font: “Arial Bold”, 21.0 points. The effect is still there and more clear. > 4. Anti-aliasing. There is some behind the scenes magic when drawing text, > that determines whether it knows the background color and therefore whether > it anti-aliases using the background color. > Tried anti-aliasing, explicitly turning it ON and OFF. No change. > 5. Overlays. It’s possible that NSTextField already draws the text more than > once, to give a partial outline effect that increases contrast with mid-level > color backgrounds. > Is there a way to determine/change overlays by text field? > 6. Traits. NSTextField may be opting into the trait behavior that classifies > text as Body, Headline, Caption, etc. These things might cause some > adjustment to the font weight. Or the accessibility features that change the > font appearance. (But I’m not sure which of those is available on macOS.) > Tried with changing traits like font weight (for drawInRect:) from 0 to 15, but the effect is still there. > _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
