Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Text Measuring Issue



The best solution for this would be just to use ATSUI. It can do all of the
stuff you're wanting, and TXNDrawCFStringTextBox will eventually call down
to those APIs anyway. And, it's supported with older versions of the
operating system and CarbonLib, if that may be a concern for you.
________________________________________________________________________
Gary L. Wade
Product Development Consultant
DesiSoft Systems | Voice: 214-642-6883
9619 E. Valley Ranch Parkway | E-Mail: email@hidden
Suite 2125 | Web: http://www.desisoftsystems.com/
Irving, TX 75063 |

Want a name worthy of a Star Wars character? Download DSS Name Convoluter
today from DesiSoft Systems at http://www.desisoftsystems.com/
________________________________________________________________________

On 8/18/03 9:28 AM, "Brian Criscuolo" <email@hidden> wrote:

> Hi all,
>
> I am using TXNDrawCFStringTextBox to generate a page for printing
> (DrawThemeTextBox doesn't print), which works very well for most
> purposes. I'm printing out strings from a database, so I have no
> page-layout storage; instead this is generated on the fly by
> pre-calculating the layout of all the rectangles within the printable
> area based on the text's GetThemeTextDimensions.
>
> One problem that I'm facing is when the text dimensions are larger than
> what will fit on the page. I need to determine where in a body of text a
> rectangle will break the text; then I would need to split the string and
> render a new rectangle (on a new page) to handle the rest of the text
> (probably by doing a CFStringCreateWithSubstring).
>
> So, all knowledgeable Carbon developers, does anyone know of a method to
> determine how much text (character offset, CFRange, lines, etc) fits in
> a fixed-size rectangle? A search of the usual headers (Appearance.h,
> CFString.h, MacTextEditor.h) aren't giving me the "Aha!" that I'm
> longing for.
>
> Thanks in advance,
> brian
>
> ******************
> Brian M. Criscuolo
> DataViz, Inc. Engineering
> email@hidden
> 203.874.0085 x3065
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.