> On 18 Sep 2016, at 7:24 PM, Gabriel Zachmann <z...@tu-clausthal.de> wrote:
> 
> But if anyone could suggest modifications to make it better (e.g., remove a 
> bug, make it simpler, or more future proof),
> I will greatly appreciate it.


Have you looked at or tried CATextLayer? It already does all of this internally 
- you just have to set up its font, size, string, etc.

Since you’re drawing this into a CALayer anyway, I think you’re going to lose 
the sub-pixel antialiasing that you get using Core Graphics. I think (but maybe 
misremembered) that CATextLayer does something to ensure that works. But even 
if it doesn’t, it’ll still be a better option than replicating its 
functionality.

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

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

Reply via email to