On 28 Nov 2016, at 16:18, Gerriet M. Denkmann <gerri...@icloud.com> wrote: > > >> On 28 Nov 2016, at 22:13, Eric E. Dolecki <edole...@gmail.com> wrote: >> >> You could probably use an attributed string and add an attribute for the >> last colon: NSBaselineOffsetAttributeName > > Yes; but this would be some rather desperate work-around. > > I was rather thinking of UIFontDescriptorFeatureSettingsAttribute with some > Feature type from SFNTLayoutTypes.h (in CoreText). > I tried a few types, but no success so far.
The problem you’ve got is that unless the font has a feature that specifically allows you to change *any* colon (as opposed to a colon between two numerals), you aren’t going to be able to do it by turning on an OpenType feature. Even if you can, there doesn’t appear to be a standard feature code for this, so you’d be reliant on Apple not changing it in the future. What you *could* do instead is get Core Text (or Cocoa Text) to lay out a string e.g. "12:00”, then grab the glyph for the centred colon directly from that string and use it explicitly, e.g. by attaching a kCTGlyphInfoAttributeName attribute to your string with the value set to an appropriately constructed CTGlyphInfoRef. Kind regards, Alastair. -- http://alastairs-place.net _______________________________________________ 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