Re: How to draw text with expanded inter-character spacing
Re: How to draw text with expanded inter-character spacing
- Subject: Re: How to draw text with expanded inter-character spacing
- From: Keary Suska <email@hidden>
- Date: Mon, 23 Mar 2009 12:02:38 -0600
On Mar 23, 2009, at 7:20 AM, Fabry, Geza wrote:
I would like to draw some text into my custom view wider than usual
but
not by stretching the glyphs using a transformation but by increasing
the spacing between the glyphs (like in Font > Character Spacing >
Spacing > Expanded/Condensed in MS Word). Is there an attribute for an
NSAttributedString like kATSUAfterWithStreamShiftTag was in ATSUI or
any
other way to do that?
I think what you want is to change the font "tracking", but I don't
think there is a way to do that easily (no public setting for it). You
could try fiddling with font kerning, but that might have an
inconsistent look. There is a font manager property called "font
trait", but I think that requires an actual font variant for
condensed, expanded, etc. I don't know if it can be "faked". You could
fake it by inserting space characters of determined sizes, or scrap
the text view do your own thing (which is likely what Word is doing).
HTH,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
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