• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to draw text with expanded inter-character spacing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: Programmatically Change Icon (From: Pierce Freeman <email@hidden>)
 >How to draw text with expanded inter-character spacing (From: "Fabry, Geza" <email@hidden>)

  • Prev by Date: Re: How to get a scroll view to recognize overflow on a custom view?
  • Next by Date: Re: How to implement quick-playing and slow-playing of sound file?
  • Previous by thread: How to draw text with expanded inter-character spacing
  • Next by thread: Re: Programmatically Change Icon
  • Index(es):
    • Date
    • Thread