On Apr 10, 2017, at 11:20 , Navneet Kumar <[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?

2. Resolution. It may be that the text drawing ends up in drawing contexts with 
different resolution backing stores (1x vs. 2x vs. 3x).

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?

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.

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.

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.)


_______________________________________________

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]

Reply via email to