Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: How can you control letter spacing using ATSUCreateTextLayoutWithTextPtr ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can you control letter spacing using ATSUCreateTextLayoutWithTextPtr ?



On 12/25/05 4:24 PM, "Edward de Jong" <email@hidden> wrote:

> How does one efficiently offer tighter than normal or wider than
> normal spacing, without resorting to the addition of a special font
> that contains negative width characters, which would require special
> presence tests, and a more complicated install?

ATSUI can do this in two ways: font-controlled, or app-controlled.

Font-controlled letterspacing is represented by the kerning and tracking
features, and relies on data in the font to make the appearance correct.
Thus, a font with a tracking table enables an app developer to provide the
user with, say, a popup menu for "Tight", "Normal" or "Loose" letterspacing,
and the tracking table will control how that happens in a font-sensitive
way.

Kerning is sensitive to which glyphs are adjacent, and adjusts spacing
accordingly. Tracking works irrespective of which glyphs are involved.

App-controlled letterspacing is represented by "with-stream shifts". These
allow you to specify either a positive or a negative amount and spacing
between pairs of glyphs will be adjusted by that amount. This does not rely
on font data; it works with any fonts. Note that both app-controlled
letterspacing and font-controlled letterspacing are handled at the style-run
level, so you can turn the features on and off by making appropriate runs.

Other letterspacing effects are available in ATSUI via justification, but
that's a much more advanced topic. If you're interested, see this
whitepaper:

http://developer.apple.com/fonts/WhitePapers/GXJustification.html

It talks about GX, which was ATSUI's spiritual predecessor. The models are
pretty much the same.

Dave Opstad
Line Layout Weenie (ret.)

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >How can you control letter spacing using ATSUCreateTextLayoutWithTextPtr ? (From: Edward de Jong <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.