Re: How to draw text with expanded inter-character spacing

2009-03-23 Thread Keary Suska


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 (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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


How to draw text with expanded inter-character spacing

2009-03-23 Thread Fabry, Geza
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?
Thanks,
Geza
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com