On Nov 28, 2016, at 07:01 , Gerriet M. Denkmann <gerri...@icloud.com> 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 (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