Re: Vertically Centered Colon
Re: Vertically Centered Colon
- Subject: Re: Vertically Centered Colon
- From: Quincey Morris <email@hidden>
- Date: Mon, 28 Nov 2016 09:40:10 -0800
- Feedback-id: 167118m:167118agrif8a:167118soJ94Y-FG4:SMTPCORP
On Nov 28, 2016, at 07:01 , Gerriet M. Denkmann <email@hidden> wrote:
>
> But in my case I have “21:37:44” where ““21:37” is bold and “:44” is thin.
a. Are you using an attributed string whose text is “21:37:44”, or two unattributed strings?
b. You have a — I don’t know exactly what to call it — “logical” or “consistency” problem inherent in this situation, because it’s not obvious which font the second “:” should be in. I’m not suggesting you’re incapable of making a decision, but that your actual problem is a consequence of this underlying ambiguity. What would you do if the “:” glyphs were radically different in the two fonts?
c. Where does the colon character come from in the first place? Specifically, you’re using a formatted time string, which could be expected to come from (say) a DateFormatter. How do you know there are going to be any colons at all, let alone two of them? Given that you work so much with non-Latin scripts, I find it surprising that you would make assumptions about how a time is represented. (Again, of course, you may have decided this is the correct approach for your scenario, but it strikes me as worth commenting on.)
What I’m suggesting is that perhaps you should treat this as something like a code smell, and re-evaluate whether changing fonts in the middle of the time string is a good idea.
FWIW.
_______________________________________________
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