Re: Can I add my own characters to strings in text fields?
Re: Can I add my own characters to strings in text fields?
- Subject: Re: Can I add my own characters to strings in text fields?
- From: Jerry Krinock <email@hidden>
- Date: Wed, 24 Mar 2010 09:16:22 -0700
On 2010 Mar 24, at 08:15, Mike Abdullah wrote:
> Have you tried using an attributed string to render that character at a particular size or font? Rather than resort to an image attachment, it might well allow you to force the arrow to show up as you want it.
Thank you, Mike. Not with this particular character. I just looked at it in a few dozen different fonts and found that it looks best, indeed probably good enough, in Arial font.
But shlepping around an attributed string is going to make my code really ugly, and in general this approach is going to be hit-or-miss. One easy fix would be to change the font of the entire text fields and menus where this character might be used. Arial font is fine with me, but then my app is going to start looking different than other apps, and may break if Arial is not available?
Maybe I could write a value transformer which would take in a NSString, search it for certain characters, and output an attributed string with runs to make these characters Arial.
But it sure would be nice if there was a way to do this by making my own character as I proposed in my first paragraph. That would seem to keep the problem encapsulated into the proper domain. Any fontologists out there?
Jerry
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden