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

How can you control letter spacing using ATSUCreateTextLayoutWithTextPtr ?



I am trying to draw a sequence of unicode letters with controllable spacing. My first cut was to use ATSUCreateTextLayoutWithTextPtr() to draw each character one at a time. Needless to say this is very slow, and has the really nasty side effect of using special ending characters in fonts like Apple Chancery, which has alternative letters for the last character in a word, and I am getting all the letters with special ending forms which is of course totally incorrect.

I can imagine adding mixed point size letters in the stream to achieve additional spacing between two letters for example the letter A 12 pt, followed by a space in 2 pt size, followed by a B in 12 pt, followed by a 2pt space, followed by C would draw ABC widely spaced. The problem is that this approach doesn't allow for negative spacing between letters (to make the letters tighter together than normal).

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?

I don't know why the designers of text output routines always seem to fail to account for letter spacing issues; letter spacing is a very important issue in copyfitting, and we need control over this.


edj

_______________________________________________
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




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.